This is the mail archive of the gcc@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: GCC Support of Function/Variable Attributes


On Thu, 28 Feb 2013, Jeffrey Walton wrote:

I'm having trouble compiling sources adorned with the aligned
attribute under Clang 3.1. Clang claims its GCC 4.2.1 compatible:

$ clang -dM -E -x c /dev/null | grep -i gnuc
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 1
#define __GNUC_STDC_INLINE__ 1
#define __GNUC__ 4

When did GCC add support for function and variable attributes?
Specifically, __attribute__(aligned) for x86/x64? Did the aligned
attribute come into being after GCC 4.2?

That wouldn't be the only place where clang is not perfectly compatible with gcc...


http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html

When you click on "Manual" on gcc's webpage, you are sent to a list of manuals per version:
http://gcc.gnu.org/onlinedocs/


Seems easy to check the oldest one:
http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC90

(and if it hadn't been supported then, you could have used a dichotomy)

--
Marc Glisse


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