This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]