Subject: gcc "__attribute__", ({}), in the source tree.
To: None <>
From: Perry E. Metzger <>
List: tech-toolchain
Date: 12/27/2005 14:34:06
In discussing a couple of issues with core, the issue of our use of
the gcc'ism "__attribute__ ((foo))" in our source tree came up.

For some items, we currently have macros in cdefs.h (see __packed,
__unused, etc.) that are the official way to do such things, though we
have places in the source tree where we don't use them consistently.
For other items, we don't have a macro and we use __attribute__((foo))

In the interest of trying to minimize the number of gccisms in the
tree, it might be a good idea to turn all our __attribute__ uses into
macros properly defined and conditionalized in cdefs.h


Also, in a bunch of our tree, we use the gcc style ({}) syntax in
macros, although we could instead use inline functions (and in a few
cases other techniques) which are portable outside of gcc. Should we
be attempting to convert these in an effort to minimize gccisms?

Perry E. Metzger