This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about #pragma removal
- From: Nick Ing-Simmons <nick dot ing-simmons at elixent dot com>
- To: brett dot cook at intel dot com
- Cc: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Date: Thu, 14 Mar 2002 17:15:31 +0000
- Subject: Re: Question about #pragma removal
- References: <AA70E30319FAD411AC6E00A0C95D7ABD013D3762@fmsmsx61.fm.intel.com>
- Reply-to: Nick Ing-Simmons <nick dot ing-simmons at elixent dot com>
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/