[Bug libstdc++/52764] Including <cstdint> after <stdint.h> fails to define limit macros
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Sat Apr 7 16:07:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52764
--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-04-07 16:06:46 UTC ---
My previous suggestion stands of having the compiler predefine
__STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS, whether for C++11 or
generally for C++, to make all existing stdint.h headers work as desired.
You could predefine in the compiler, or you could predefine in
stdint-wrap.h when it includes a system stdint.h and remove the
conditionals in stdint-gcc.h. (In the header might be better because then
you can use #ifndef to avoid any conflict with a user's definition of
those macros.)
If the libstdc++ people conclude that these definitions should be present
for all C++ versions, not just C++11, then the conditionals in glibc's
stdint.h can be removed at leisure (the predefines in GCC will make the
conditionals useless but harmless).
More information about the Gcc-bugs
mailing list