The attached patch adjust tests to expect quoting where it was
previously not expected.

Martin
gcc/testsuite/ChangeLog:

	* g++.dg/abi/Wabi-2-3.C: Adjust.
	* g++.dg/abi/Wabi-3-2.C: Ditto.
	* g++.dg/lookup/using17.C: Ditto.
	* gcc.dg/format/gcc_diag-1.c (foo): Ditto.

diff --git a/gcc/testsuite/g++.dg/abi/Wabi-2-3.C b/gcc/testsuite/g++.dg/abi/Wabi-2-3.C
index 96a0f22..d7af979 100644
--- a/gcc/testsuite/g++.dg/abi/Wabi-2-3.C
+++ b/gcc/testsuite/g++.dg/abi/Wabi-2-3.C
@@ -12,5 +12,5 @@ template <int &> struct S { };
 
 // Expect the diagnostic to reference the ABI version specified via
 // -fabi-version=3 and the ABI version specified via -Wabi=2.
-void foo (S<N>) { }   // { dg-warning "the mangled name of .void foo\\(S<N>\\). changed between -fabi-version=2 \\(_Z3foo1SILZ1NEE\\) and -fabi-version=3 \\(_Z3foo1SIL_Z1NEE\\)" }
+void foo (S<N>) { }   // { dg-warning "the mangled name of .void foo\\(S<N>\\). changed between .-fabi-version=2. \\(._Z3foo1SILZ1NEE.\\) and .-fabi-version=3. \\(._Z3foo1SIL_Z1NEE.\\)" }
 
diff --git a/gcc/testsuite/g++.dg/abi/Wabi-3-2.C b/gcc/testsuite/g++.dg/abi/Wabi-3-2.C
index 46bd713..703b277 100644
--- a/gcc/testsuite/g++.dg/abi/Wabi-3-2.C
+++ b/gcc/testsuite/g++.dg/abi/Wabi-3-2.C
@@ -12,5 +12,5 @@ template <int &> struct S { };
 
 // Expect the diagnostic to reference the ABI version specified via
 // -fabi-version=2 and the ABI version specified via -Wabi=3.
-void foo (S<N>) { }   // { dg-warning "the mangled name of .void foo\\(S<N>\\). changes between -fabi-version=2 \\(_Z3foo1SILZ1NEE\\) and -fabi-version=3 \\(_Z3foo1SIL_Z1NEE\\)" }
+void foo (S<N>) { }   // { dg-warning "the mangled name of .void foo\\(S<N>\\). changes between .-fabi-version=2. \\(._Z3foo1SILZ1NEE.\\) and .-fabi-version=3. \\(._Z3foo1SIL_Z1NEE.\\)" }
 
diff --git a/gcc/testsuite/g++.dg/lookup/using17.C b/gcc/testsuite/g++.dg/lookup/using17.C
index 9b008fe..ec2f551 100644
--- a/gcc/testsuite/g++.dg/lookup/using17.C
+++ b/gcc/testsuite/g++.dg/lookup/using17.C
@@ -3,11 +3,11 @@
 // { dg-do compile }
 
 namespace M {
-  struct S {}; // { dg-message "struct M::S" "candidate 2" }
+  struct S {}; // { dg-message ".struct M::S." "candidate 2" }
 }
 
 int S;
-struct S {}; // { dg-message "candidates are: struct S" "candidate 1" }
+struct S {}; // { dg-message "candidates are: .struct S." "candidate 1" }
 
 using namespace M;
 
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-1.c b/gcc/testsuite/gcc.dg/format/gcc_diag-1.c
index f4922cd..4dcdb05 100644
--- a/gcc/testsuite/gcc.dg/format/gcc_diag-1.c
+++ b/gcc/testsuite/gcc.dg/format/gcc_diag-1.c
@@ -70,20 +70,21 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p,
   cdiag ("%m");
   cxxdiag ("%m");
 
-  tdiag ("%D%F%T%V", t1, t1, t1, t1);
-  tdiag ("%+D%+F%+T%+V", t1, t1, t1, t1);
+  /* Quote directives to avoid "warning: conversion used unquoted." */
+  tdiag ("%<%D%F%T%V%>", t1, t1, t1, t1);
+  tdiag ("%<%+D%+F%+T%+V%>", t1, t1, t1, t1);
   tdiag ("%q+D%q+F%q+T%q+V", t1, t1, t1, t1);
-  tdiag ("%D%D%D%D", t1, t2, *t3, t4[5]);
-  cdiag ("%D%F%T%V", t1, t1, t1, t1);
-  cdiag ("%+D%+F%+T%+V", t1, t1, t1, t1);
+  tdiag ("%<%D%D%D%D%>", t1, t2, *t3, t4[5]);
+  cdiag ("%<%D%F%T%V%>", t1, t1, t1, t1);
+  cdiag ("%<%+D%+F%+T%+V%>", t1, t1, t1, t1);
   cdiag ("%q+D%q+F%q+T%q+V", t1, t1, t1, t1);
-  cdiag ("%D%D%D%D", t1, t2, *t3, t4[5]);
-  cdiag ("%E", t1);
-  cxxdiag ("%A%D%E%F%T%V", t1, t1, t1, t1, t1, t1);
-  cxxdiag ("%D%D%D%D", t1, t2, *t3, t4[5]);
-  cxxdiag ("%#A%#D%#E%#F%#T%#V", t1, t1, t1, t1, t1, t1);
-  cxxdiag ("%+A%+D%+E%+F%+T%+V", t1, t1, t1, t1, t1, t1);
-  cxxdiag ("%+#A%+#D%+#E%+#F%+#T%+#V", t1, t1, t1, t1, t1, t1);
+  cdiag ("%<%D%D%D%D%>", t1, t2, *t3, t4[5]);
+  cdiag ("%<%E%>", t1);
+  cxxdiag ("%<%A%D%E%F%T%V%>", t1, t1, t1, t1, t1, t1);
+  cxxdiag ("%<%D%D%D%D%>", t1, t2, *t3, t4[5]);
+  cxxdiag ("%<%#A%#D%#E%#F%#T%#V%>", t1, t1, t1, t1, t1, t1);
+  cxxdiag ("%<%+A%+D%+E%+F%+T%+V%>", t1, t1, t1, t1, t1, t1);
+  cxxdiag ("%<%+#A%+#D%+#E%+#F%+#T%+#V%>", t1, t1, t1, t1, t1, t1);
   cxxdiag ("%C%L%O%P%Q", i, i, i, i, i);
 
   tdiag ("%v%qv%#v", i, i, i);
@@ -113,7 +114,7 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p,
   tdiag ("%#D", t1); /* { dg-warning "format" "bogus modifier" } */
   cdiag ("%A", t1); /* { dg-warning "format" "bogus tree" } */
   cdiag ("%#D", t1); /* { dg-warning "format" "bogus modifier" } */
-  cdiag ("%+D", t1);
+  cdiag ("%<%+D%>", t1);
   cxxdiag ("%C"); /* { dg-warning "format" "missing arg" } */
   cxxdiag ("%C", l); /* { dg-warning "format" "wrong arg" } */
   cxxdiag ("%C", i, i); /* { dg-warning "format" "extra arg" } */

Reply via email to