public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/17979] New: inconsistency between uchar.h and stdint.h
@ 2015-02-13 23:49 dwight.guth at runtimeverification dot com
  0 siblings, 0 replies; only message in thread
From: dwight.guth at runtimeverification dot com @ 2015-02-13 23:49 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-13 23:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13 23:49 [Bug libc/17979] New: inconsistency between uchar.h and stdint.h dwight.guth at runtimeverification dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).