This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/52764] Including <cstdint> after <stdint.h> fails to define limit macros
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Mar 2012 10:25:22 +0000
- Subject: [Bug libstdc++/52764] Including <cstdint> after <stdint.h> fails to define limit macros
- Auto-submitted: auto-generated
- References: <bug-52764-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52764
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-29 10:25:22 UTC ---
Joseph, I was just about to file a glibc bug, let me know if you want that
done.
Glibc's stdint.h (and GCC's stdint-gcc.h) must unconditionally define the
macros for C++11.
It's debatable whether they should be defined for C++03. The __STDC_xxx_MACROS
macros make sense there to avoid macro pollution, but arguably no strict C++03
program will include <stdint.h> anyway, so defining them unconditionally would
also be reasonable, and consistent with C++11.
GCC also needs to workaround the problem for "older" (i.e. all existing) glibc
versions.