&& DECL_VISIBILITY_SPECIFIED (newdecl)
&& DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl))
{
- warning_at (input_location, OPT_Wattributes,
- "%q+D: visibility attribute ignored because it", newdecl);
- warning_at (DECL_SOURCE_LOCATION (olddecl), OPT_Wattributes,
- "conflicts with previous declaration here");
+ if (warning_at (DECL_SOURCE_LOCATION (newdecl), OPT_Wattributes,
+ "%qD: visibility attribute ignored because it "
+ "conflicts with previous declaration", newdecl))
+ inform (DECL_SOURCE_LOCATION (olddecl),
+ "previous declaration of %qD", olddecl);
}
/* Choose the declaration which specified visibility. */
if (DECL_VISIBILITY_SPECIFIED (olddecl))
be merged. */
TREE_PUBLIC (decl) = 0;
DECL_COMMON (decl) = 0;
- warning_at (input_location, 0,
- "sorry: semantics of inline function static "
- "data %q+#D are wrong (you%'ll wind up "
- "with multiple copies)", decl);
- warning_at (DECL_SOURCE_LOCATION (decl), 0,
- " you can work around this by removing "
- "the initializer");
+ if (warning_at (DECL_SOURCE_LOCATION (decl), 0,
+ "sorry: semantics of inline function static "
+ "data %q#D are wrong (you%'ll wind up "
+ "with multiple copies)", decl))
+ inform (DECL_SOURCE_LOCATION (decl),
+ "you can work around this by removing the initializer");
}
}
}
+2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/60373
+ * g++.dg/cpp0x/Wattributes1.C: New.
+ * g++.dg/ext/visibility/redecl1.C: Adjust.
+ * g++.dg/ext/visibility/visibility-7.C: Likewise.
+
2014-05-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc.target/powerpc/vsxcopy.c: New test.