[Bug c++/65558] [5 Regression] crash using __attribute__((__abi_tag__)) on anonymous inline namespace
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 25 18:00:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65558
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
If it is correct to ignore the abi_tag on an anonymous namespace (docs say "The
ABI tags apply to a name..."), then:
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -3663,6 +3663,12 @@ handle_namespace_attrs (tree ns, tree attributes)
"namespace", name);
continue;
}
+ if (!DECL_NAME (ns))
+ {
+ warning (OPT_Wattributes, "ignoring %qD attribute on anonymous "
+ "namespace", name);
+ continue;
+ }
if (!args)
{
tree dn = DECL_NAME (ns);
More information about the Gcc-bugs
mailing list