Testcase gcc.dg/attr-invalid.c started failing on mingw32 with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125975
In particular, this delta * tree.c (handle_dll_attribute): Set DECL_VISIBILITY on the imported or exported declaration, including type declarations. made these TYPE_DECL's valid: # 88 "attr-invalid.c" typedef int dllimport_type __attribute__((dllimport)); typedef int (*dllimport_fntype)(void) __attribute__((dllimport)); Prior to that revision the attribute was valid only on FUNCTION_DECLS's and VAR_DECL's However, although there is no warning, the attribute is ignored typedef int dllimport_type __attribute__((dllimport)); extern dllimport_type foo; int bar () { return foo; } gives _bar: pushl %ebp movl %esp, %ebp movl _foo, %eax popl %ebp ret -- Summary: Dllimport attribute wrongly accepted on typedefs Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dannysmith at users dot sourceforge dot net GCC target triplet: i686-pc-mingw32 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33963