This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 2841
  stdint.h misdefines UINT8_C and UINT16_C to append U Last modified: 2006-08-12 21:23:18
     Query page      Enter new bug
Bug#: 2841   Hardware:   Reporter: Paul Eggert <eggert@gnu.org>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: Ulrich Drepper <drepper@redhat.com>   Target Milestone:  
Flags: Requestee:
  backport ()
  examined ()
  testsuite ()
Summary:
Keywords:

Attachment Description Type Created Actions
patch UINT8_C and UINT16_C should not append U patch 2006-06-24 06:36 Edit | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 2841 depends on: Show dependency tree
Show dependency graph
Bug 2841 blocks:

Additional Comments:


Leave as RESOLVED FIXED
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2006-06-24 06:35
C99 7.18.4.1 (as revised by ISO/IEC 9899:1999/Cor.1:2001) says that
UINT8_C and UINT16_C return values corresponding to uint_least8_t and
uint_least16_t.  They therefore must promote the same way.  But glibc
appends 'U', which causes UINT8_C and UINT16_C to promote to 'unsigned
int', not 'int'.  Here is a test program illustrating the bug: it
strictly conforms to the C99 but GCC + glibc reject it.  I'll attach
the obvious patch.

#include <stdint.h>
char test1[(-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1];
char test2[(-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1];

------- Additional Comment #1 From Paul Eggert 2006-06-24 06:36 -------
Created an attachment (id=1121)
UINT8_C and UINT16_C should not append U

------- Additional Comment #2 From Ulrich Drepper 2006-08-12 21:23 -------
The specificaiton is broken one way or another so I don't really care.  The
patch is in cvs.

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In