http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55655
--- Comment #2 from Matthew Woehlke <mw_triad at users dot sourceforge.net> 2012-12-11 21:06:26 UTC --- Created attachment 28930 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28930 example code Here's a simplified concrete example. Since we are talking about correct visibility, -fvisibility=hidden or #pragma equivalent is implied; otherwise, compile flags do not (AFAIK) matter.