> > I know that the current version gcc supports function visibility > attributes, yet some of the previous versions does not. > > Could any one kindly tell since which version is visibility attribute > supported by gcc? So that I will be able to write some conditional > macros definition code to make things more flexible? > > The macro definition is supposed to be something like: > #if ((__GNUC__ *100 +__GNUC_MINOR__) >= 303) > #define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) > #else > #define G_GNUC_INTERNAL > #endif > Look at this wiki entry for checking visibility(a macros is already there...): http://gcc.gnu.org/wiki/Visibility And by reading manual, you will find, that visibility attribute appeared in 3.3 release (earlier compiler do not have this option documented in manual) Arturas M.