On Sep 30, 2014, at 9:15 AM, Joseph S. Myers <jos...@codesourcery.com> wrote: > On Tue, 30 Sep 2014, Richard Earnshaw wrote: > >> GCC is written in C++ these days, so technically, you need the C++ >> standard :-) > > And, while C++14 requires plain int bit-fields to be signed, GCC is > written in C++98/C++03.
So, seemingly left unstated in the thread is what is required by the language standard we write in… From c++98: It is implementa- tion-defined whether bit-fields and objects of char type are repre- sented as signed or unsigned quantities. The signed specifier forces char objects and bit-fields to be signed; it is redundant with other integral types. So, I think you need a signed on bitfields if your want them to be signed. It doesn’t matter what g++ does, if we want to be portable to any C++ compiler.