"Andrew W. Nosenko" <andrew.w.nosenko@xxxxxxxxx> writes: > Ok, but what if compiler does not support "#pragma GCC visibility", > what you plan to do? > The reason of question: if samples above are full, i.e. you indeed > don't have #else part, then you just don't need the #if at all. > If compiler supports "#pragma GCC visibility" then it will execute it > with #if (because HAVE_PRAGMA_VISIBILITY will be defined) or without. > If compiler doesn't support it, then pragma GCC visibility will be > skipped with #if (because undefined HAVE_PRAGMA_VISIBILITY) or without > (just because unknown pragmas are ignored per standard). Indeed, all of my code just uses pairs of: #pragma GCC visibility push(hidden) #pragma GCC visibility pop unconditionally. Non-GCC compilers just ignore the pragmata (and then hopefully some of the same effect, although not the performance gains, are imposed by either symbol versioning or by libtool export lists, depending on what's available). -- Russ Allbery (rra@xxxxxxxxxxxx) <http://www.eyrie.org/~eagle/> _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf