[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
some headers prevent later code from using __attribute__
From: |
Ben Pfaff |
Subject: |
some headers prevent later code from using __attribute__ |
Date: |
Fri, 29 Jul 2005 19:41:36 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
The xalloc.h header provided by gnulib contains the following
directives. Some other headers also contain similar directives:
# ifndef __attribute__
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) ||
__STRICT_ANSI__
# define __attribute__(x)
# endif
# endif
This seems pretty unfriendly to later code that may want to use
__attribute__ and doesn't expect to be interfered with this way.
I would suggest using a different identifier, but if not, then it
seems like the various versions should be the same, at least.
Some make use of __attribute__ conditional on GCC 2.5 or later,
others on GCC 2.8 or later. The results are thus going to vary
based on the order of inclusion of header files.
--
address@hidden - address@hidden - address@hidden - address@hidden
- some headers prevent later code from using __attribute__,
Ben Pfaff <=