This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: sh64-elf (SH5) port
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 3 Feb 2002 05:54:34 -0500
- Subject: Re: sh64-elf (SH5) port
- References: <orwuxux40b.fsf@free.redhat.lsd.ic.unicamp.br>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Feb 03, 2002 at 08:18:28AM -0200, Alexandre Oliva wrote:
> --- gcc/c-decl.c 2 Feb 2002 00:14:31 -0000 1.294
> +++ gcc/c-decl.c 3 Feb 2002 01:14:12 -0000
> @@ -5727,7 +5727,11 @@ finish_struct (t, fieldlist, attributes)
> DECL_BIT_FIELD (x) = 1;
> SET_DECL_C_BIT_FIELD (x);
>
> - if (width == 0)
> + if (width == 0
> +#ifdef MS_BITFIELD_LAYOUT_P
> + && ! MS_BITFIELD_LAYOUT_P (t)
> +#endif
> + )
Wouldn't it be better to define MS_BITFIELD_LAYOUT_P in defaults.h if not
already defined to:
#define MS_BITFIELD_LAYOUT_P(t) 0
and avoid all the #ifdefs?
It would be both better readable and compiler could check the code for
errors even on non-SH arches.
Jakub