This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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 libc/17979] New: inconsistency between uchar.h and stdint.h


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.


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