]> sourceware.org Git - newlib-cygwin.git/commit
ctype: align size of category bit fields to small targets needs
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 14 Mar 2018 09:36:34 +0000 (10:36 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 14 Mar 2018 10:38:24 +0000 (11:38 +0100)
commit134f93f313db95c394b925716717031a05b2a6d3
tree30d77a10c28dfd58f23d370dbb08086fad06bb2b
parentedcf783dc2fc89f32a29443ceb5a362d0ee6910c
ctype: align size of category bit fields to small targets needs

E.g. arm ABI requires -fshort-enums for bare-metal toolchains.
Given there are only 29 category enums, the compiler chooses an
8 bit enum type, so a size of 11 bits for the bitfield leads to
a compile time error:

  error: width of 'cat' exceeds its type
    enum category cat: 11;
                  ^~~

Fix this by aligning the size of the category members to byte
borders.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
newlib/libc/ctype/categories.c
This page took 0.030686 seconds and 5 git commands to generate.