Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
f47a2df5
Commit
f47a2df5
authored
Sep 24, 2009
by
zhanyong.wan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makes gmock compile on minGW, which uses gcc 3.4.5.
parent
a89034c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
gmock-printers.h
include/gmock/gmock-printers.h
+6
-3
No files found.
include/gmock/gmock-printers.h
View file @
f47a2df5
...
...
@@ -279,9 +279,12 @@ void DefaultPrintTo(IsNotContainer /* dummy */,
if
(
p
==
NULL
)
{
*
os
<<
"NULL"
;
}
else
{
// We cannot use implicit_cast or static_cast here, as they don't
// work when p is a function pointer.
*
os
<<
reinterpret_cast
<
const
void
*>
(
p
);
// We want to print p as a const void*. However, we cannot cast
// it to const void* directly, even using reinterpret_cast, as
// earlier versions of gcc (e.g. 3.4.5) cannot compile the cast
// when p is a function pointer. Casting to UInt64 first solves
// the problem.
*
os
<<
reinterpret_cast
<
const
void
*>
(
reinterpret_cast
<
internal
::
UInt64
>
(
p
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment