This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/59945] "uint" typedef is visible with "g++ -std=c++11 -pedantic"
- 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: Sun, 26 Jan 2014 00:06:21 +0000
- Subject: [Bug c++/59945] "uint" typedef is visible with "g++ -std=c++11 -pedantic"
- Auto-submitted: auto-generated
- References: <bug-59945-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59945
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Glibc defines it:
#ifdef __USE_MISC
/* Old compatibility names for C types. */
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
#endif
__USE_MISC is defined because G++ defines _GNU_SOURCE, which is well known to
cause problems, e.g. PR 11196 and PR 51749
This particular namespace pollution only occurs with C++11 because <string>
only needs to #include <cstdlib> in C++11 mode to define std::to_string,
std::stoi etc. but in general the problem affects C++98 too.
*** This bug has been marked as a duplicate of bug 51749 ***