On 30/09/14 20:33, Mike Stump wrote: > 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: >
Isn't that exactly what I suggested? "However, since GCC is supposed to bootstrap using a portable ISO C++ compiler, there's an argument for removing the ambiguity entirely by being explicit." > 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. > R.