[cfe-dev] visibility does not match previous declaration, again

Andriy Gapon avg at FreeBSD.org
Thu Nov 28 13:27:32 PST 2013


I've run into a problem somewhat similar to
http://llvm.org/bugs/show_bug.cgi?id=13662

Reduced test case is:
#pragma GCC visibility push(hidden)
typedef struct foo bar;
struct __attribute__((__visibility__("default"))) foo {};

If the typedef line is commented out, then everything compiles just fine.
It was unexpected to me that typedef can have this effect, but I am not sure
what applicable standards say about this situation.

-- 
Andriy Gapon



More information about the cfe-dev mailing list