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: Question about #pragma removal


Brett Cook <brett.cook@intel.com> writes:
>What I don't understand is how __attribute__ eliminates this problem.  I
>cite the following examples:
>
>1)  There is no telling what the same __attribute__ might mean to another
>compiler
>2)  For compiler specific features, such as the #pragma, or the
>__attribute__ feature, it is a mistake to not surround these lines with
>preprocessor statements such as '#ifdef GNU_C' or '#ifdef MSC'.

__attribute__ makes it much easier to loose all the GNU-ish things
with just one:

#ifndef __GNUC__
#define __attribute__(x)
#endif

--
Nick Ing-Simmons
http://www.ni-s.u-net.com/




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