Comments (7)
Thanks for the report. I thought I had compiled this on a 64-bit machine before
releasing, but maybe not.
When I do try building on an x86_64 machine with gcc 4.2.2, I don't get the
warnings
you mentioned. We define int64 to be int64_t, which it seems to me should work
with
%lld, but maybe it doesn't on some systems.
I know how to solve this kind of problem in general, but I wish I could
reproduce the
problem to make sure my solution works.
Can you give more details on what OS and compiler you're using?
Original comment by [email protected]
on 10 Jul 2008 at 11:58
from gflags.
This is a similar situation to issue 12. If you are using a build system that
treats
warnings as errors on a 64 bit system (you can simulate this with the supplied
build
system by running ./configure CXXFLAGS="-Wall -Werror -O2 -g" before make),
besides
the signedness warnings in issue 12 you will receive the warning mentioned
originally
in this issue.
The supplied build system (./configure && make) works just fine, but this issue
is
for cases in which the supplied build system is replaced with another for
various
reasons.
If this issue is a situation in which a given warning is something Google
explicitly
ignores, that's okay, but perhaps this is something that can be cleanly fixed
for
everyone.
Thanks. :)
Original comment by jtolds
on 16 Jul 2008 at 12:13
from gflags.
Hmm, not sure if it's the same as issue 12, since correctness could be affected
in
this case. But I'm not sure.
I can't reproduce the problem on my 64-bit system, so I'm not exactly sure what
the
issue is, so I'm marking this Won't Fix for now. Feel free to reopen if you
start to
see problems with this.
Original comment by [email protected]
on 23 Jul 2008 at 12:24
- Changed state: WontFix
from gflags.
I'd re-open this if I knew how, but I know the source of this warning.
Using http://gcc.gnu.org/ml/gcc-help/2008-07/msg00029.html for my hunch, I
believe
the problem is that on 64-bit systems, int_64_t is typedef'd to long int, not
long
long int.
I notice on my system (debian/etch, gcc 4.3.1 ):
sizeof(int) == 4
sizeof(long int) == 8
sizeof(long long int) == 8
So, luckily, the warning won't cause any problems. But it appears that on
64-bit
systems, the appropriate printf format would be "%ld", not "%lld".
Original comment by [email protected]
on 5 Aug 2008 at 3:10
from gflags.
Indeed from /usr/include/stdint.h from the libc6-dev package on debian/testing
amd64:
# if __WORDSIZE == 64
typedef long int int64_t;
# else
__extension__
typedef long long int int64_t;
#endif
Original comment by [email protected]
on 5 Aug 2008 at 3:15
from gflags.
Gotcha. OK, this is pretty easy to fix. In the next gflags release, I'll
replace
%lld with the PRId64 macro, which is standard and written to address just this
problem.
Original comment by [email protected]
on 5 Aug 2008 at 10:19
- Changed state: Started
from gflags.
Fixed in gflags 1.0rc1.
Original comment by [email protected]
on 21 Aug 2008 at 12:56
- Changed state: Fixed
from gflags.
Related Issues (20)
- Please put the label 'google' on this project HOT 5
- Warnings in Visual Studio 2010 and unable to compile unit test HOT 10
- Can't locate auto/Autom4te/XFile/msg.al in @INC HOT 2
- How to set kRootDir for FlagValue::CleanName
- Support NuGet package generation for Windows users HOT 1
- @GFLAGS_IS_A_DLL@ expands to empty string in gflags_declare.h HOT 6
- Set INTERFACE_COMPILE_DEFINITIONS of imported gflags library targets to define GFLAGS_DLL_DECL HOT 2
- Google glog fails to compile against gflags HOT 5
- Google glog fails to find gflags/gflags.h when using google namespace HOT 4
- Compilation error on Windows when trying to use the library. HOT 2
- Add library versioning (soname) HOT 6
- Import symbols into google namespace to maintain backwards compatibility HOT 10
- Flags always have default value HOT 1
- Bad soname version in current git master HOT 10
- Incorrect makefile generation with cmake HOT 1
- compile problem HOT 5
- Support uint32 as flag type
- ReloadNonCommandFlags needed HOT 2
- FindThreadsCXX error when cross-compiling HOT 10
- Google Code is dying
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 gflags.