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]

System header #define'ing __attribute__


I'm trying to compile gcc3.2 on bsdi2.1.  Yes, I know it's an obsolete
platform.

I run into problems because in <sys/cdefs.h> there's the following:
/*
 * GCC1 and some versions of GCC2 declare dead (non-returning) and
 * pure (no side effects) functions using "volatile" and "const";
 * unfortunately, these then cause warnings under "-ansi -pedantic".
 * GCC2 uses a new, peculiar __attribute__((attrs)) style.  All of
 * these work for GNU C++ (modulo a slight glitch in the C++ grammar
 * in the distribution version of 2.5.5).
 */
#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5
#define __attribute__(x)        /* delete __attribute__ if non-gcc or gcc1 */

now, of course, this worked great for any gcc 2.x version, but not for
any gcc 3.x version.  As it is, stuff in libgcc is built with
wrong-width integers and everything goes to hell.

What's the proper way to make gcc aware of this problem and work around
it?

Jeff Epler
jepler at unpythonic dot net
(wishing his employer would also declare bsdi2.1 obsolete)


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