* pt.c (convert_template_argument): Add a diagnostic for the
[temp.arg]/2 ambiguity case.
+ * name-lookup.c (finish_using_directive): Don't issue inform() if the
+ warning didn't trigger. Add quoting. Tweak the inform message.
+
2019-05-20 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.h: Remove remnants of CONV_NONCONVERTING.
if (current_binding_level->kind == sk_namespace
&& is_attribute_p ("strong", name))
{
- warning (0, "strong using directive no longer supported");
- if (CP_DECL_CONTEXT (target) == current_namespace)
+ if (warning (0, "%<strong%> using directive no longer supported")
+ && CP_DECL_CONTEXT (target) == current_namespace)
inform (DECL_SOURCE_LOCATION (target),
- "you may use an inline namespace instead");
+ "you can use an inline namespace instead");
}
else
warning (OPT_Wattributes, "%qD attribute directive ignored", name);
* g++.dg/cpp2a/nontype-class17.C: New test.
+ * g++.dg/lookup/strong-using2.C: New test.
+
2019-05-20 Jeff Law <law@redhat.com>
* gcc.dg/Wtype-limits-Wextra.c: Adjust expected output after
--- /dev/null
+// { dg-do compile { target c++11 } }
+// { dg-options "-w" }
+
+namespace A
+{
+ namespace B // { dg-bogus "inline namespace" }
+ {
+ }
+
+ using namespace B __attribute__ ((strong)); // { dg-bogus "no longer supported" }
+}