http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51930

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-15 
10:15:06 UTC ---
(In reply to comment #7)
> The test struct might come from an external library I have no control of, 
> which
> will make it difficult to change its visibility.

You could declare the struct before including that library's headers and set
its visibility with a pragma:

#pragma GCC visibility push(default)
struct test;
#pragma GCC visibility pop

Reply via email to