...
When enabling warnings or using attributes in gcc, test that each is actually accepted by gcc; various warnings and attributes are being added all the time, and ICC emulates GCC in some ways. For anything going into installed header files, though, explicit compiler, version, and language tests (_GNUC, __INTEL_COMPILER, __GNUC_MINOR, __GNUC_PATCHLEVEL_, __cplusplus, etc) are necessary, because they may be used with other compilers besides the one we build with. At http://www.ohse.de/uwe/articles/gcc-attributes.html there's a good list of function attributes supported in gcc versions 2.0 through 3.4.0; I haven't seen a table covering later versions too.
...