Comments (3)
This was valid C++, relying on implicit conversion to double.
I don't know that we need to be clear of all possible warnings on all possible
compilers.
-Wconversion is not included in -Wall or -Wextra because it triggers so often
on safe code.
https://gcc.gnu.org/wiki/NewWconversion#Frequently_Asked_Questions
"Implicit conversions are very common in C. This tied with the fact that there
is no data-flow in front-ends (see next question) results in hard to avoid
warnings for perfectly working and valid code. Wconversion is designed for a
niche of uses (security audits, porting 32 bit code to 64 bit, etc.) where the
programmer is willing to accept and workaround invalid warnings. Therefore, it
shouldn't be enabled if it is not explicitly requested."
Original comment by [email protected]
on 7 Mar 2015 at 4:05
from googlemock.
Understood. But do you think the patch I suggested would be wrong ? If not,
wouldn't it be ok to include it and make life easier for those that do use the
compiler option during 32-bit to 64-bit port ?
Original comment by [email protected]
on 7 Mar 2015 at 4:11
from googlemock.
If you're using that compiler option, it is emitting warnings, not errors.
There are indeed 64-bit values of 'ms', representing intervals of about 150k+
years, for which the conversion to double will be lossy. The printing of those
intervals will be similarly lossy, as stringstream will print only 6 places of
precision by default. So the change i correct.
I don't want to commit to keeping gtest free of such warnings, though.
Original comment by [email protected]
on 7 Mar 2015 at 7:19
from googlemock.
Related Issues (20)
- Make thread-safe on Windows HOT 2
- Use override keyword with new C++11 compilers HOT 15
- MOCK_METHOD with an std::pair argument doesn't compile with VS2010 HOT 11
- got segmentation error in Linux, When gtest library is linked from /usr/lib/lgtest HOT 1
- Visual Studio 10 release link fails
- smart pointers are leaked with InSequence
- [deleted issue]
- Enable make install, just set the library to nodist.
- complie 1.7 with vs 2010 fail HOT 2
- Crash caused by missing lock HOT 4
- Suport for Variadic Templates
- Building fails on r477 HOT 1
- Is it possible to mock function template methods? HOT 1
- looser throw specifier for
- Infinite Loop when calling a mock function that takes boost::filesystem::path as parameter HOT 4
- Throwing an exception as default breaks call count expectation
- MatchAndExplainImpl fails to compile with VC++ 2013 /analyze HOT 1
- moving to GITHUB ?
- Multiple GCC warnings on TypedEq HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from googlemock.