About gcc 3.4.3, the cleanup attribute, and the no-attributes flag

Ian Lance Taylor iant@google.com
Wed May 9 04:57:00 GMT 2012


Christian Sasso <christian.sasso@gmail.com> writes:

> I developed some C code that makes use of the 'cleanup' attribute: I
> tested it with gcc 4.3.2 on an x86 based processor running in 32 bit
> mode, and it works great.
>
> I am now told that such code should also compile using gcc 3.4.3
> targeting a PowerPC processor running either in 32 or 64 bit mode:
> would such combination work? If not, what would be the oldest version
> of the compiler that does reliably support the cleanup attribute
> targeting PowerPC processors? Would I need to enable/disable any
> special compiler flags for better results? Thanks a lot for all the
> information you can provide me.

The cleanup attribute should work fine in GCC 3.4.3.  It should also
work fine for PPC--the attribute is target independent.  No special
flags should be required.

> One last question: what is the oldest version of gcc that reliably
> supports the no-attributes flag (I noticed that gcc 3.4.3 doesn't
> recognize it)?

The -Wno-attributes option was added in GCC 4.1.

Ian



More information about the Gcc-help mailing list