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/448] <stdint.h>-related issues (C99 issues)



------- Comment #21 from joseph at codesourcery dot com  2009-07-31 12:54 -------
Subject: Re:  <stdint.h>-related issues (C99 issues)

On Fri, 31 Jul 2009, paolo dot carlini at oracle dot com wrote:

> I'm wondering if there is something we can/should do here about C++1x: in the
> new Standard (see 18.4.1/2 in n2914, for example), for <cstdint> we have:
> 
> The header defines all functions, types, and macros the same as C99 7.18. [
> Note: The macros defined by <cstdint> are provided unconditionally. In
> particular, the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS
> (mentioned in C99 footnotes 219, 220, and 222) play no role in C++. end note ]

I would suggest predefining those macros in C++1x mode; that should make 
things work with all existing stdint.h implementations that care about 
those macros.

If you need help beyond that - for example, to ensure that each of 
<stdint.h> and <cstdint> puts things in the right namespaces - then 
stdint-gcc.h could certainly be adjusted to know about C++ requirements, 
but systems with their own stdint.h generally only use stdint-gcc.h for 
freestanding compilations so further help from libc implementors may be 
needed.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=448


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