This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ix86_data_alignment: bad defaults?
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 23 Feb 2007 00:49:30 +0100
- Subject: Re: ix86_data_alignment: bad defaults?
- References: <200702222340.l1MNeNbC018989@greed.delorie.com>
>
> Why do we use 256 instead of BIGGEST ALIGNMENT in ix86_data_alignment?
> This is causing all sorts of build problems for djgpp, as I'm getting
> lots of warnings about too-big alignments, and with -Werror...
It is to improve performance of string functions on larger chunks of
data. x86-64 specify this, for x86 it is optional. I don't think we
should end up warning here - it is done only for static variables where
the alignment can be higher than what BIGGEST_ALIGNMENT promise.
Honza
>
> Index: i386.c
> ===================================================================
> --- i386.c (revision 122221)
> +++ i386.c (working copy)
> @@ -15417,7 +15417,7 @@
> int
> ix86_data_alignment (tree type, int align)
> {
> - int max_align = optimize_size ? BITS_PER_WORD : 256;
> + int max_align = optimize_size ? BITS_PER_WORD : BIGGEST_ALIGNMENT;
>
> if (AGGREGATE_TYPE_P (type)
> && TYPE_SIZE (type)