This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17979] New: inconsistency between uchar.h and stdint.h
- From: "dwight.guth at runtimeverification dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 13 Feb 2015 23:49:46 +0000
- Subject: [Bug libc/17979] New: inconsistency between uchar.h and stdint.h
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17979
Bug ID: 17979
Summary: inconsistency between uchar.h and stdint.h
Product: glibc
Version: 2.21
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: dwight.guth at runtimeverification dot com
CC: drepper.fsp at gmail dot com
According to C11 section 7.28 paragraph 2, char16_t and char32_t must be
defined as the same type as uint_least16_t and uint_least32_t, which are
defined in stdint.h. stdint.h defines these types as "unsigned short int" and
"unsigned int" respectively. However, uchar.h defines them as __CHAR16_TYPE__
and __CHAR32_TYPE__, and then only if you are compiling using the GNU C
compiler. If you are using the glibc headers with a different compiler, the
types are not defined at all, and parsing of the header fails with a syntax
error.
I suggest that it is probably for the best if the definitions of char16_t and
char32_t are kept directly in sync with the definitions of uint_least16_t and
uint_least32_t in stdint.h. This would resolve this issue and also allow other
compilers to use these headers.
--
You are receiving this mail because:
You are on the CC list for the bug.