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.