This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix for "FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o compile, (internal compiler error)"
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Andreas Schwab <schwab at suse dot de>, David Sherwood <David dot Sherwood at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "vmakarov at redhat dot com" <vmakarov at redhat dot com>, Richard Sandiford <Richard dot Sandiford at arm dot com>
- Date: Tue, 30 Sep 2014 14:53:09 +0100
- Subject: Re: Fix for "FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o compile, (internal compiler error)"
- Authentication-results: sourceware.org; auth=none
- References: <000001cfd995$c7bcafe0$57360fa0$ at arm dot com> <8738b9leiv dot fsf at e105548-lin dot cambridge dot arm dot com> <mvmwq8liky8 dot fsf at hawking dot suse dot de> <87y4t1jreq dot fsf at e105548-lin dot cambridge dot arm dot com> <mvmppediawv dot fsf at hawking dot suse dot de>
On 30/09/14 12:51, Andreas Schwab wrote:
> Richard Sandiford <richard.sandiford@arm.com> writes:
>
>> Andreas Schwab <schwab@suse.de> writes:
>>> Richard Sandiford <richard.sandiford@arm.com> writes:
>>>
>>>> @@ -315,7 +318,7 @@ struct ira_allocno
>>>> number (0, ...) - 2. Value -1 is used for allocnos spilled by the
>>>> reload (at this point pseudo-register has only one allocno) which
>>>> did not get stack slot yet. */
>>>> - short int hard_regno;
>>>> + int hard_regno : 16;
>>>
>>> If you want negative numbers you need to make that explicitly signed.
>>
>> Are you sure?
>
> See C11, 6.7.2#5.
>
> Each of the comma-separated multisets designates the same type,
> except that for bit-fields, it is implementation-defined whether the
> specifier int designates the same type as signed int or the same
> type as unsigned int.
>
>
> Andreas.
>
GCC is written in C++ these days, so technically, you need the C++
standard :-)
GNU C defaults to signed bitfields (see trouble.texi). 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. We
no-longer have to worry about compilers that don't support the signed
keyword.
R.