This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: Fix for "FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o compile, (internal compiler error)"


On 30/09/14 20:33, Mike Stump wrote:
> On Sep 30, 2014, at 9:15 AM, Joseph S. Myers <joseph@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.


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