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: sh64-elf (SH5) port


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


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