This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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] |
On Tue, 2005-09-20 at 12:23 +0200, Corinna Vinschen wrote:However, it doesn't even build when using RTMES stdint.h/inttypes.h, so I don't think the RTEMS stdint.h was ready for prime time:
Well, it survived ca. 1 year of repeated reviews and tests. Apparently these reviews have not been very thorough.
- A couple of disturbing warnings about INT32_MIN, INT64_MIN, INT64_MAX and the corresponding unsigned defnitions:
INT32_MIN: warning: this decimal constant is unsigned only in ISO C90 INT64_MIN: integer constant is so large that it is unsigned this decimal constant is unsigned only in ISO C90 INT64_MAX: integer constant is too large for "long" type UINT32_MAX: warning: this decimal constant is unsigned only in ISO C90 UINT64_MAX: warning: integer constant is so large that it is unsigned warning: this decimal constant is unsigned only in ISO C90 warning: integer constant is too large for "long" type
True.
When uncommenting every other problem in the file, there's also a bug in evaluating the INT32*_MIN values:
INT32_MIN, INTLEAST32_MIN are printed as the positive value 2147483648, not -2147483648.
- All *LEAST* definitions are incorrect because RTEMS' stdint.h defines them omitting an underscore after the type:
RTEMS: INTLEAST8_MIN SUSv3: INT_LEAST8_MIN
Right, this is trivial typo, nobody has tripped so far ...
- The condition, when to include limits.h and when not to include it, seems not to be foolproof.
Yes, gcc-4 is not correctly taken into account, which (bogusly) causes the compiler to fall back to the non-gcc-3 rules.
The most severe problem however is elsewhere: The __EXP macro in stdint doesn't work as it should for the gcc >= 3 case.
Jeff, I'd recommend to move this file back to the RTEMS folder. I'll try to gradually fix this file.
BTW: The only points required by building GCC and RTEMS are the sizes of the types, not the limits. That's probably why most of the bugs pointed out herein have passed unnoticed so far.
Ralf
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |