On 28/11/12 15:05, Jakub Jelinek wrote:
On Wed, Nov 28, 2012 at 03:02:12PM +, Richard Earnshaw wrote:
#if (GCC_VERSION < 2007)
# define __attribute__(x)
#endif
...
#ifndef ATTRIBUTE_PACKED
# define ATTRIBUTE_PACKED __attribute__ ((packed))
#endif
So in theory it should expand to nothing for
On Wed, Nov 28, 2012 at 03:02:12PM +, Richard Earnshaw wrote:
> >#if (GCC_VERSION < 2007)
> ># define __attribute__(x)
> >#endif
> >...
> >#ifndef ATTRIBUTE_PACKED
> ># define ATTRIBUTE_PACKED __attribute__ ((packed))
> >#endif
> >
> >So in theory it should expand to nothing for non-GCC compile
On 22/11/12 07:52, Jakub Jelinek wrote:
On Thu, Nov 22, 2012 at 12:26:01AM +0100, Eric Botcazou wrote:
2012-11-21 Jakub Jelinek
* ree.c (struct ext_modified): Add ATTRIBUTE_PACKED.
Are you sure that this will compile with non-GCC compilers?
I'm not sure, but I hope it will. ansi
> I'm not sure, but I hope it will. ansidecl.h has
> #ifndef GCC_VERSION
> #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
> #endif /* GCC_VERSION */
> ...
> #if (GCC_VERSION < 2007)
> # define __attribute__(x)
> #endif
> ...
> #ifndef ATTRIBUTE_PACKED
> # define ATTRIBUTE_PACKED __attribut
On Thu, Nov 22, 2012 at 12:26:01AM +0100, Eric Botcazou wrote:
> > 2012-11-21 Jakub Jelinek
> >
> > * ree.c (struct ext_modified): Add ATTRIBUTE_PACKED.
>
> Are you sure that this will compile with non-GCC compilers?
I'm not sure, but I hope it will. ansidecl.h has
#ifndef GCC_VERSION
#d
> 2012-11-21 Jakub Jelinek
>
> * ree.c (struct ext_modified): Add ATTRIBUTE_PACKED.
Are you sure that this will compile with non-GCC compilers?
--
Eric Botcazou
Hi!
The PR55430 miscompilation of ree.c by LRA lead me to look at
this structure, which was really meant to be just 2 byte long, but
is unnecessarily 4 byte long. As it only contains 8, 2 and 1 bit bitfields,
it can always (except old alphas) be accessed by 1 byte loads/stores, so
packed attribut