[Bug c++/59945] "uint" typedef is visible with "g++ -std=c++11 -pedantic"

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jan 26 00:06:00 GMT 2014


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 ***



More information about the Gcc-bugs mailing list