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
Mark confirms this should not be accepted for scalar types, so a regression. Working on a patch.
Subject: Bug 33963 Author: jsm28 Date: Thu Feb 28 12:34:51 2008 New Revision: 132744 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132744 Log: PR target/33963 * tree.c (handle_dll_attribute): Disallow TYPE_DECLs for types other than structures and unions. Modified: trunk/gcc/ChangeLog trunk/gcc/tree.c
Subject: Bug 33963 Author: jsm28 Date: Thu Mar 6 17:29:36 2008 New Revision: 132978 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132978 Log: PR target/33963 * tree.c (handle_dll_attribute): Disallow TYPE_DECLs for types other than structures and unions. Modified: branches/gcc-4_3-branch/gcc/ChangeLog branches/gcc-4_3-branch/gcc/tree.c
Fixed in 4.3.1 and 4.4.0.