On the modules branch, I'm starting to add location information. Line numbers don't really make sense when reporting errors reading a binary file, so I wanted to change the diagnostics such that line number zero (which is not a line) is not printed -- one just gets the file name. I then noticed that we don't elide column zero (also, not a column outside of emacsland).

This patch changes the diagnostics, such that line-zero prints neither line nor column and column-zero doesn't print the column.

The testsuite presumes that all diagnostics have a column (which may or may not be specified in the test pattern). This patch augments it such that a prefix of '-:' indicates 'no column'. We still default to expecting a column

The vast bulk is annotating C & C++ tests that do not have a column. Some of those were explicitly checking for column-zero, but many just expected some arbitrary column number, which happened to be zero. Of course many (most?) of these diagnostics could be improved to provide a column. Most are from the preprocessor.

While this is a change in the compiler's output, it's effectively returning to a pre-column formatting for the cases where the column number is not known. I'd expect (hope?) error message parsers to be robust in that case. (I've found it confusing when column-zero is printed, as I think columns might be zero-based after all.)

bootstrapped on all languages.

ok?

nathan
--
Nathan Sidwell
2017-10-25  Nathan Sidwell  <nat...@acm.org>

	* diagnostic.c (maybe_line_and_column): New.
	(diagnostic_get_location_text): Use it.
	(diagnostic_report_current_module): Likewise.
	testsuite/
	* lib/gcc-dg.exp (process-message): Use -: for no column.
	* c-c++-common/cilk-plus/CK/cilk_for_grain_errors.c: Mark elided
	column messages.
	* c-c++-common/cpp/pr58844-1.c: Likewise.
	* c-c++-common/cpp/pr58844-2.c: Likewise.
	* c-c++-common/cpp/warning-zero-location.c
	* g++.dg/diagnostic/pr77949.C: Likewise.
	* g++.dg/gomp/macro-4.C: Likewise.
	* gcc.dg/Wunknownprag.c: Likewise.
	* gcc.dg/builtin-redefine.c: Likewise.
	* gcc.dg/cpp/Wunknown-pragmas-1.c: Likewise.
	* gcc.dg/cpp/Wunused.c: Likewise.
	* gcc.dg/cpp/misspelled-directive-1.c: Likewise.
	* gcc.dg/cpp/redef2.c: Likewise.
	* gcc.dg/cpp/redef3.c: Likewise.
	* gcc.dg/cpp/redef4.c: Likewise.
	* gcc.dg/cpp/trad/Wunused.c: Likewise.
	* gcc.dg/cpp/trad/argcount.c: Likewise.
	* gcc.dg/cpp/trad/comment-3.c: Likewise.
	* gcc.dg/cpp/trad/comment.c: Likewise.
	* gcc.dg/cpp/trad/defined.c: Likewise.
	* gcc.dg/cpp/trad/directive.c: Likewise.
	* gcc.dg/cpp/trad/funlike-3.c: Likewise.
	* gcc.dg/cpp/trad/funlike.c: Likewise.
	* gcc.dg/cpp/trad/literals-2.c: Likewise.
	* gcc.dg/cpp/trad/macro.c: Likewise.
	* gcc.dg/cpp/trad/pr65238-4.c: Likewise.
	* gcc.dg/cpp/trad/recurse-1.c: Likewise.
	* gcc.dg/cpp/trad/recurse-2.c: Likewise.
	* gcc.dg/cpp/trad/redef2.c: Likewise.
	* gcc.dg/cpp/ucnid-11.c: Likewise.
	* gcc.dg/cpp/unc1.c: Likewise.
	* gcc.dg/cpp/unc2.c: Likewise.
	* gcc.dg/cpp/unc3.c: Likewise.
	* gcc.dg/cpp/unc4.c: Likewise.
	* gcc.dg/cpp/undef2.c: Likewise.
	* gcc.dg/cpp/warn-redefined-2.c: Likewise.
	* gcc.dg/cpp/warn-redefined.c: Likewise.
	* gcc.dg/cpp/warn-unused-macros-2.c: Likewise.
	* gcc.dg/cpp/warn-unused-macros.c: Likewise.
	* gcc.dg/empty-source-2.c: Likewise.
	* gcc.dg/empty-source-3.c: Likewise.
	* gcc.dg/gomp/macro-4.c: Likewise.
	* gcc.dg/noncompile/pr35447-1.c: Likewise.
	* gcc.dg/plugin/location-overflow-test-1.c: Likewise.
	* gcc.dg/pr20245-1.c: Likewise.
	* gcc.dg/pr28419.c: Likewise.
	* gcc.dg/rtl/truncated-rtl-file.c: Likewise.
	* gcc.dg/unclosed-init.c: Likewise.

Index: gcc/diagnostic.c
===================================================================
--- gcc/diagnostic.c	(revision 254060)
+++ gcc/diagnostic.c	(working copy)
@@ -293,6 +293,24 @@ diagnostic_get_color_for_kind (diagnosti
   return diagnostic_kind_color[kind];
 }
 
+/* Return a formatted line and column ':%line:%column'.  Elided if
+   zero.  The result is a statically allocated buffer.  */
+
+static const char *
+maybe_line_and_column (int line, int col)
+{
+  static char result[32];
+
+  if (line)
+    {
+      size_t l = sprintf (result, col ? ":%d:%d" : ":%d", line, col);
+      gcc_checking_assert (l + 1 < sizeof (result));
+    }
+  else
+    result[0] = 0;
+  return result;
+}
+
 /* Return a malloc'd string describing a location e.g. "foo.c:42:10".
    The caller is responsible for freeing the memory.  */
 
@@ -303,19 +321,13 @@ diagnostic_get_location_text (diagnostic
   pretty_printer *pp = context->printer;
   const char *locus_cs = colorize_start (pp_show_color (pp), "locus");
   const char *locus_ce = colorize_stop (pp_show_color (pp));
-
-  if (s.file == NULL)
-    return build_message_string ("%s%s:%s", locus_cs, progname, locus_ce);
-
-  if (!strcmp (s.file, N_("<built-in>")))
-    return build_message_string ("%s%s:%s", locus_cs, s.file, locus_ce);
-
-  if (context->show_column)
-    return build_message_string ("%s%s:%d:%d:%s", locus_cs, s.file, s.line,
-				 s.column, locus_ce);
-  else
-    return build_message_string ("%s%s:%d:%s", locus_cs, s.file, s.line,
-				 locus_ce);
+  const char *file = s.file ? s.file : progname;
+  int line = strcmp (file, N_("<built-in>")) ? s.line : 0;
+  int col = context->show_column ? s.column : 0;
+
+  const char *line_col = maybe_line_and_column (line, col);
+  return build_message_string ("%s%s%s:%s", locus_cs, file,
+			       line_col, locus_ce);
 }
 
 /* Return a malloc'd string describing a location and the severity of the
@@ -577,21 +589,20 @@ diagnostic_report_current_module (diagno
       if (! MAIN_FILE_P (map))
 	{
 	  map = INCLUDED_FROM (line_table, map);
-	  if (context->show_column)
-	    pp_verbatim (context->printer,
-			 "In file included from %r%s:%d:%d%R", "locus",
-			 LINEMAP_FILE (map),
-			 LAST_SOURCE_LINE (map), LAST_SOURCE_COLUMN (map));
-	  else
-	    pp_verbatim (context->printer,
-			 "In file included from %r%s:%d%R", "locus",
-			 LINEMAP_FILE (map), LAST_SOURCE_LINE (map));
+	  const char *line_col
+	    = maybe_line_and_column (LAST_SOURCE_LINE (map),
+				     context->show_column
+				     ? LAST_SOURCE_COLUMN (map) : 0);
+	  pp_verbatim (context->printer,
+		       "In file included from %r%s%s%R", "locus",
+		       LINEMAP_FILE (map), line_col);
 	  while (! MAIN_FILE_P (map))
 	    {
 	      map = INCLUDED_FROM (line_table, map);
+	      line_col = maybe_line_and_column (LAST_SOURCE_LINE (map), 0);
 	      pp_verbatim (context->printer,
-			   ",\n                 from %r%s:%d%R", "locus",
-			   LINEMAP_FILE (map), LAST_SOURCE_LINE (map));
+			   ",\n                 from %r%s%s%R", "locus",
+			   LINEMAP_FILE (map), line_col);
 	    }
 	  pp_verbatim (context->printer, ":");
 	  pp_newline (context->printer);
Index: gcc/testsuite/c-c++-common/cilk-plus/CK/cilk_for_grain_errors.c
===================================================================
--- gcc/testsuite/c-c++-common/cilk-plus/CK/cilk_for_grain_errors.c	(revision 254060)
+++ gcc/testsuite/c-c++-common/cilk-plus/CK/cilk_for_grain_errors.c	(working copy)
@@ -18,7 +18,7 @@ int main(int argc, char **argv)
   _Cilk_for (int ii = 0; ii < 10; ii++)
     Array1[ii] = 0;
 
-#pragma cilk grainsiz = 2 /* { dg-warning "ignoring #pragma cilk grainsiz" } */
+#pragma cilk grainsiz = 2 /* { dg-warning "-:ignoring #pragma cilk grainsiz" } */
   _Cilk_for (int ii = 0; ii < 10; ii++)
     Array1[ii] = 0;
 
Index: gcc/testsuite/c-c++-common/cpp/pr58844-1.c
===================================================================
--- gcc/testsuite/c-c++-common/cpp/pr58844-1.c	(revision 254060)
+++ gcc/testsuite/c-c++-common/cpp/pr58844-1.c	(working copy)
@@ -4,5 +4,5 @@
 
 #define A x######x
 int A = 1;
-#define A x######x	/* { dg-message "previous definition" } */
-#define A x##x		/* { dg-warning "redefined" } */
+#define A x######x	/* { dg-message "-:previous definition" } */
+#define A x##x		/* { dg-warning "-:redefined" } */
Index: gcc/testsuite/c-c++-common/cpp/pr58844-2.c
===================================================================
--- gcc/testsuite/c-c++-common/cpp/pr58844-2.c	(revision 254060)
+++ gcc/testsuite/c-c++-common/cpp/pr58844-2.c	(working copy)
@@ -4,5 +4,5 @@
 
 #define A x######x
 int A = 1;
-#define A x######x	/* { dg-message "previous definition" } */
-#define A x##x		/* { dg-warning "redefined" } */
+#define A x######x	/* { dg-message "-:previous definition" } */
+#define A x##x		/* { dg-warning "-:redefined" } */
Index: gcc/testsuite/c-c++-common/cpp/warning-zero-location.c
===================================================================
--- gcc/testsuite/c-c++-common/cpp/warning-zero-location.c	(revision 254060)
+++ gcc/testsuite/c-c++-common/cpp/warning-zero-location.c	(working copy)
@@ -3,6 +3,6 @@
    { dg-do compile }
  */
 
-#define _GNU_SOURCE 	/* { dg-warning "redefined" } */
+#define _GNU_SOURCE 	/* { dg-warning "-:redefined" } */
 
 /* { dg-message "" "#define _GNU_SOURCE" {target *-*-* } 0 } */
Index: gcc/testsuite/g++.dg/diagnostic/pr77949.C
===================================================================
--- gcc/testsuite/g++.dg/diagnostic/pr77949.C	(revision 254060)
+++ gcc/testsuite/g++.dg/diagnostic/pr77949.C	(working copy)
@@ -4,4 +4,4 @@
 /* Very long line, where a missing semicolon would be suggested for
    insertion at column 4097.  */
 class test {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   }   
-// { dg-error "0: expected .;. after class definition" "" { target *-*-* } .-1 }
+// { dg-error "-: expected .;. after class definition" "" { target *-*-* } .-1 }
Index: gcc/testsuite/g++.dg/gomp/macro-4.C
===================================================================
--- gcc/testsuite/g++.dg/gomp/macro-4.C	(revision 254060)
+++ gcc/testsuite/g++.dg/gomp/macro-4.C	(working copy)
@@ -10,9 +10,9 @@ void bar (void);
 void
 foo (void)
 {
-#pragma omp p		// { dg-warning "ignoring #pragma omp _Pragma" }
+#pragma omp p		// { dg-warning "-:ignoring #pragma omp _Pragma" }
     bar ();
-  omp_p			// { dg-warning "ignoring #pragma omp _Pragma" }
+  omp_p			// { dg-warning "-:ignoring #pragma omp _Pragma" }
     bar ();
 }
 
@@ -22,8 +22,8 @@ foo (void)
 void
 baz (void)
 {
-#pragma omp parallel	// { dg-warning "ignoring #pragma omp serial" }
+#pragma omp parallel	// { dg-warning "-:ignoring #pragma omp serial" }
     bar ();
-  omp_parallel		// { dg-warning "ignoring #pragma omp serial" }
+  omp_parallel		// { dg-warning "-:ignoring #pragma omp serial" }
     bar ();
 }
Index: gcc/testsuite/gcc.dg/Wunknownprag.c
===================================================================
--- gcc/testsuite/gcc.dg/Wunknownprag.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/Wunknownprag.c	(working copy)
@@ -5,7 +5,7 @@
 
 /* We used to get "unspellable token: CPP_EOF" warnings.  */
 
-#pragma				/* { dg-warning "ignoring #pragma" } */
-#pragma ~			/* { dg-warning "ignoring #pragma" } */
-#pragma baz			/* { dg-warning "ignoring #pragma" } */
-#pragma baz baz			/* { dg-warning "ignoring #pragma" } */
+#pragma				/* { dg-warning "-:ignoring #pragma" } */
+#pragma ~			/* { dg-warning "-:ignoring #pragma" } */
+#pragma baz			/* { dg-warning "-:ignoring #pragma" } */
+#pragma baz baz			/* { dg-warning "-:ignoring #pragma" } */
Index: gcc/testsuite/gcc.dg/builtin-redefine.c
===================================================================
--- gcc/testsuite/gcc.dg/builtin-redefine.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/builtin-redefine.c	(working copy)
@@ -27,8 +27,8 @@
 #define __TIME__ "X"         /* Define while undefined.  */
 #define __TIME__ "X"         /* Re-define while defined.  */ /* { dg-line time_prev } */
 
-#define __TIME__ "Y"         /* { dg-warning "\"__TIME__\" redefined" } */
-/* { dg-message "previous definition" "" { target *-*-* } time_prev } */
+#define __TIME__ "Y"         /* { dg-warning "-:\"__TIME__\" redefined" } */
+/* { dg-message "-:previous definition" "" { target *-*-* } time_prev } */
 
 #undef __TIME__              /* Undefine while defined.  */
 
@@ -38,8 +38,8 @@
 #define __DATE__ "X"         /* Define while undefined.  */
 #define __DATE__ "X"         /* Re-define while defined.  */ /* { dg-line date_prev } */
 
-#define __DATE__ "Y"         /* { dg-warning "\"__DATE__\" redefined" } */
-/* { dg-message "previous definition" "" { target *-*-* } date_prev } */
+#define __DATE__ "Y"         /* { dg-warning "-:\"__DATE__\" redefined" } */
+/* { dg-message "-:previous definition" "" { target *-*-* } date_prev } */
 
 #undef __DATE__              /* Undefine while defined.  */
 
@@ -47,8 +47,8 @@
 #define __TIMESTAMP__ "X"    /* Define while already defined.  */
 #define __TIMESTAMP__ "X"    /* Re-define while defined.  */ /* { dg-line timestamp_prev } */
 
-#define __TIMESTAMP__ "Y"    /* { dg-warning "\"__TIMESTAMP__\" redefined" } */
-/* { dg-message "previous definition" "" { target *-*-* } timestamp_prev } */
+#define __TIMESTAMP__ "Y"    /* { dg-warning "-:\"__TIMESTAMP__\" redefined" } */
+/* { dg-message "-:previous definition" "" { target *-*-* } timestamp_prev } */
 
 #undef __TIMESTAMP__         /* Undefine while defined.  */
 
@@ -71,9 +71,9 @@
 /* { dg-bogus "Expected built-in is not defined" "" { target *-*-* } .-1 } */
 #endif
 
-#define __LINE__ 0           /* { dg-warning "\"__LINE__\" redef" } */
-#define __INCLUDE_LEVEL__ 0  /* { dg-warning "\"__INCLUDE_LEVEL__\" redef" } */
-#define __COUNTER__ 0        /* { dg-warning "\"__COUNTER__\" redef" } */
+#define __LINE__ 0           /* { dg-warning "-:\"__LINE__\" redef" } */
+#define __INCLUDE_LEVEL__ 0  /* { dg-warning "-:\"__INCLUDE_LEVEL__\" redef" } */
+#define __COUNTER__ 0        /* { dg-warning "-:\"__COUNTER__\" redef" } */
 
 
 int unused;  /* Silence `ISO C forbids an empty translation unit' warning.  */
Index: gcc/testsuite/gcc.dg/cpp/Wunknown-pragmas-1.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/Wunknown-pragmas-1.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/Wunknown-pragmas-1.c	(working copy)
@@ -5,25 +5,25 @@
 
 /* Make sure we get warnings in the expected lines.  */
 
-#pragma unknown1 /* { dg-warning "unknown1" "unknown1" } */
+#pragma unknown1 /* { dg-warning "-:unknown1" "unknown1" } */
 
 #define COMMA ,
 #define FOO(x) x
 #define BAR(x) _Pragma("unknown_before") x
 #define BAZ(x) x _Pragma("unknown_after")
 
-int _Pragma("unknown2") bar1; /* { dg-warning "unknown2" "unknown2" } */
+int _Pragma("unknown2") bar1; /* { dg-warning "-:unknown2" "unknown2" } */
 
-FOO(int _Pragma("unknown3") bar2); /* { dg-warning "unknown3" "unknown3" } */
+FOO(int _Pragma("unknown3") bar2); /* { dg-warning "-:unknown3" "unknown3" } */
 
-int BAR(bar3); /* { dg-warning "unknown_before" "unknown_before 1" } */
+int BAR(bar3); /* { dg-warning "-:unknown_before" "unknown_before 1" } */
 
-BAR(int bar4); /* { dg-warning "unknown_before" "unknown_before 2" } */
+BAR(int bar4); /* { dg-warning "-:unknown_before" "unknown_before 2" } */
 
-int BAZ(bar5); /* { dg-warning "unknown_after" "unknown_after 1" } */
+int BAZ(bar5); /* { dg-warning "-:unknown_after" "unknown_after 1" } */
 
-int BAZ(bar6;) /* { dg-warning "unknown_after" "unknown_after 2" } */
+int BAZ(bar6;) /* { dg-warning "-:unknown_after" "unknown_after 2" } */
 
-FOO(int bar7; _Pragma("unknown4")) /* { dg-warning "unknown4" "unknown4" } */
+FOO(int bar7; _Pragma("unknown4")) /* { dg-warning "-:unknown4" "unknown4" } */
 
-#pragma unknown5 /* { dg-warning "unknown5" "unknown5" } */
+#pragma unknown5 /* { dg-warning "-:unknown5" "unknown5" } */
Index: gcc/testsuite/gcc.dg/cpp/Wunused.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/Wunused.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/Wunused.c	(working copy)
@@ -15,9 +15,9 @@
 #define used3			/* { dg-bogus "used" } */
 #define used4 used4		/* { dg-bogus "used" } */
 
-#define unused5			/* { dg-warning "used" } */
-#define unused6			/* { dg-warning "used" } */
-#define unused7()		/* { dg-warning "used" } */
+#define unused5			/* { dg-warning "-:used" } */
+#define unused6			/* { dg-warning "-:used" } */
+#define unused7()		/* { dg-warning "-:used" } */
 
 #if defined used1
 #endif
Index: gcc/testsuite/gcc.dg/cpp/misspelled-directive-1.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/misspelled-directive-1.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/misspelled-directive-1.c	(working copy)
@@ -1,4 +1,4 @@
-#ifndef SOME_GUARD /* { dg-error "unterminated" } */
+#ifndef SOME_GUARD /* { dg-error "-:unterminated" } */
 
 #if 1
 /* Typo here: "endfi" should have been "endif".  */
Index: gcc/testsuite/gcc.dg/cpp/redef2.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/redef2.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/redef2.c	(working copy)
@@ -17,15 +17,15 @@
 #define foo(x) x
 #define foo(x)x		/* { dg-bogus "redefined" "redefined foo" } */
 
-/* { dg-warning "redefined" "redef mac"     { target *-*-* } 7  }
-   { dg-warning "redefined" "redef mac"     { target *-*-* } 8  }
-   { dg-warning "redefined" "redef mac"     { target *-*-* } 9  }
-   { dg-warning "redefined" "redef ro"      { target *-*-* } 12 }
-   { dg-warning "redefined" "redef va"      { target *-*-* } 15 }
+/* { dg-warning "-:redefined" "redef mac"     { target *-*-* } 7  }
+   { dg-warning "-:redefined" "redef mac"     { target *-*-* } 8  }
+   { dg-warning "-:redefined" "redef mac"     { target *-*-* } 9  }
+   { dg-warning "-:redefined" "redef ro"      { target *-*-* } 12 }
+   { dg-warning "-:redefined" "redef va"      { target *-*-* } 15 }
 
-   { dg-message "previous"  "prev def mac"  { target *-*-* } 6  }
-   { dg-message "previous"  "prev def mac"  { target *-*-* } 7  }
-   { dg-message "previous"  "prev def mac"  { target *-*-* } 8  }
-   { dg-message "previous"  "prev def ro"   { target *-*-* } 11 }
-   { dg-message "previous"  "prev def va"   { target *-*-* } 14 }
+   { dg-message "-:previous"  "prev def mac"  { target *-*-* } 6  }
+   { dg-message "-:previous"  "prev def mac"  { target *-*-* } 7  }
+   { dg-message "-:previous"  "prev def mac"  { target *-*-* } 8  }
+   { dg-message "-:previous"  "prev def ro"   { target *-*-* } 11 }
+   { dg-message "-:previous"  "prev def va"   { target *-*-* } 14 }
 */
Index: gcc/testsuite/gcc.dg/cpp/redef3.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/redef3.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/redef3.c	(working copy)
@@ -11,11 +11,11 @@
 #define D 1 2
 #define E
 
-/* { dg-warning "redefined" "redef A"      { target *-*-* } 7  }
-   { dg-warning "redefined" "redef B"      { target *-*-* } 9  }
-   { dg-warning "redefined" "redef D"      { target *-*-* } 11 }
-   { dg-warning "redefined" "redef E"      { target *-*-* } 12 }
-   { dg-message "previous"  "prev def A"   { target *-*-* } 6  }
-   { dg-message "previous"  "prev def B"   { target *-*-* } 8  }
-   { dg-message "previous"  "prev def D/E" { target *-*-* } 0  }
+/* { dg-warning "-:redefined" "redef A"      { target *-*-* } 7  }
+   { dg-warning "-:redefined" "redef B"      { target *-*-* } 9  }
+   { dg-warning "-:redefined" "redef D"      { target *-*-* } 11 }
+   { dg-warning "-:redefined" "redef E"      { target *-*-* } 12 }
+   { dg-message "-:previous"  "prev def A"   { target *-*-* } 6  }
+   { dg-message "-:previous"  "prev def B"   { target *-*-* } 8  }
+   { dg-message "-:previous"  "prev def D/E" { target *-*-* } 0  }
 */
Index: gcc/testsuite/gcc.dg/cpp/redef4.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/redef4.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/redef4.c	(working copy)
@@ -4,41 +4,41 @@
 /* { dg-do preprocess } */
 /* { dg-options "" } */
 
-#define str(x) #x /* { dg-message "previous definition" } */
-#define str(x) %: x /* { dg-warning "redefined" } */
+#define str(x) #x /* { dg-message "-:previous definition" } */
+#define str(x) %: x /* { dg-warning "-:redefined" } */
 #undef str
-#define str(x) #x /* { dg-message "previous definition" } */
-#define str(x) # x /* { dg-warning "redefined" } */
+#define str(x) #x /* { dg-message "-:previous definition" } */
+#define str(x) # x /* { dg-warning "-:redefined" } */
 #undef str
-#define str(x) #x /* { dg-message "previous definition" } */
-#define str(x) %: x /* { dg-warning "redefined" } */
+#define str(x) #x /* { dg-message "-:previous definition" } */
+#define str(x) %: x /* { dg-warning "-:redefined" } */
 #undef str
-#define str(x) %:x /* { dg-message "previous definition" } */
-#define str(x) #x /* { dg-warning "redefined" } */
+#define str(x) %:x /* { dg-message "-:previous definition" } */
+#define str(x) #x /* { dg-warning "-:redefined" } */
 #undef str
-#define str(x) %:x /* { dg-message "previous definition" } */
-#define str(x) %: x /* { dg-warning "redefined" } */
+#define str(x) %:x /* { dg-message "-:previous definition" } */
+#define str(x) %: x /* { dg-warning "-:redefined" } */
 #undef str
-#define str(x) %:x /* { dg-message "previous definition" } */
-#define str(x) # x /* { dg-warning "redefined" } */
+#define str(x) %:x /* { dg-message "-:previous definition" } */
+#define str(x) # x /* { dg-warning "-:redefined" } */
 #undef str
-#define str(x) %:x /* { dg-message "previous definition" } */
-#define str(x) %: x /* { dg-warning "redefined" } */
+#define str(x) %:x /* { dg-message "-:previous definition" } */
+#define str(x) %: x /* { dg-warning "-:redefined" } */
 #undef str
-#define str(x) # x /* { dg-message "previous definition" } */
-#define str(x) #x /* { dg-warning "redefined" } */
+#define str(x) # x /* { dg-message "-:previous definition" } */
+#define str(x) #x /* { dg-warning "-:redefined" } */
 #undef str
-#define str(x) # x /* { dg-message "previous definition" } */
-#define str(x) %: x /* { dg-warning "redefined" } */
+#define str(x) # x /* { dg-message "-:previous definition" } */
+#define str(x) %: x /* { dg-warning "-:redefined" } */
 #undef str
-#define str(x) # x /* { dg-message "previous definition" } */
-#define str(x) %: x /* { dg-warning "redefined" } */
+#define str(x) # x /* { dg-message "-:previous definition" } */
+#define str(x) %: x /* { dg-warning "-:redefined" } */
 #undef str
-#define str(x) %: x /* { dg-message "previous definition" } */
-#define str(x) #x /* { dg-warning "redefined" } */
+#define str(x) %: x /* { dg-message "-:previous definition" } */
+#define str(x) #x /* { dg-warning "-:redefined" } */
 #undef str
-#define str(x) %: x /* { dg-message "previous definition" } */
-#define str(x) # x /* { dg-warning "redefined" } */
+#define str(x) %: x /* { dg-message "-:previous definition" } */
+#define str(x) # x /* { dg-warning "-:redefined" } */
 #undef str
 
 #define str(x) #x
@@ -54,173 +54,173 @@
 #define str(x) %: x
 #undef str
 
-#define astr(x) a#x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a#x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a#x /* { dg-message "previous definition" } */
-#define astr(x) a# x /* { dg-warning "redefined" } */
+#define astr(x) a#x /* { dg-message "-:previous definition" } */
+#define astr(x) a# x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a#x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a#x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a#x /* { dg-message "previous definition" } */
-#define astr(x) a #x /* { dg-warning "redefined" } */
+#define astr(x) a#x /* { dg-message "-:previous definition" } */
+#define astr(x) a #x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a#x /* { dg-message "previous definition" } */
-#define astr(x) a %:x /* { dg-warning "redefined" } */
+#define astr(x) a#x /* { dg-message "-:previous definition" } */
+#define astr(x) a %:x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a#x /* { dg-message "previous definition" } */
-#define astr(x) a # x /* { dg-warning "redefined" } */
+#define astr(x) a#x /* { dg-message "-:previous definition" } */
+#define astr(x) a # x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a#x /* { dg-message "previous definition" } */
-#define astr(x) a %: x /* { dg-warning "redefined" } */
+#define astr(x) a#x /* { dg-message "-:previous definition" } */
+#define astr(x) a %: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%:x /* { dg-message "previous definition" } */
-#define astr(x) a#x /* { dg-warning "redefined" } */
+#define astr(x) a%:x /* { dg-message "-:previous definition" } */
+#define astr(x) a#x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%:x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a%:x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%:x /* { dg-message "previous definition" } */
-#define astr(x) a# x /* { dg-warning "redefined" } */
+#define astr(x) a%:x /* { dg-message "-:previous definition" } */
+#define astr(x) a# x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%:x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a%:x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%:x /* { dg-message "previous definition" } */
-#define astr(x) a #x /* { dg-warning "redefined" } */
+#define astr(x) a%:x /* { dg-message "-:previous definition" } */
+#define astr(x) a #x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%:x /* { dg-message "previous definition" } */
-#define astr(x) a %:x /* { dg-warning "redefined" } */
+#define astr(x) a%:x /* { dg-message "-:previous definition" } */
+#define astr(x) a %:x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%:x /* { dg-message "previous definition" } */
-#define astr(x) a # x /* { dg-warning "redefined" } */
+#define astr(x) a%:x /* { dg-message "-:previous definition" } */
+#define astr(x) a # x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%:x /* { dg-message "previous definition" } */
-#define astr(x) a %: x /* { dg-warning "redefined" } */
+#define astr(x) a%:x /* { dg-message "-:previous definition" } */
+#define astr(x) a %: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a# x /* { dg-message "previous definition" } */
-#define astr(x) a#x /* { dg-warning "redefined" } */
+#define astr(x) a# x /* { dg-message "-:previous definition" } */
+#define astr(x) a#x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a# x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a# x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a# x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a# x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a# x /* { dg-message "previous definition" } */
-#define astr(x) a #x /* { dg-warning "redefined" } */
+#define astr(x) a# x /* { dg-message "-:previous definition" } */
+#define astr(x) a #x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a# x /* { dg-message "previous definition" } */
-#define astr(x) a %:x /* { dg-warning "redefined" } */
+#define astr(x) a# x /* { dg-message "-:previous definition" } */
+#define astr(x) a %:x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a# x /* { dg-message "previous definition" } */
-#define astr(x) a # x /* { dg-warning "redefined" } */
+#define astr(x) a# x /* { dg-message "-:previous definition" } */
+#define astr(x) a # x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a# x /* { dg-message "previous definition" } */
-#define astr(x) a %: x /* { dg-warning "redefined" } */
+#define astr(x) a# x /* { dg-message "-:previous definition" } */
+#define astr(x) a %: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%: x /* { dg-message "previous definition" } */
-#define astr(x) a#x /* { dg-warning "redefined" } */
+#define astr(x) a%: x /* { dg-message "-:previous definition" } */
+#define astr(x) a#x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%: x /* { dg-message "previous definition" } */
-#define astr(x) a# x /* { dg-warning "redefined" } */
+#define astr(x) a%: x /* { dg-message "-:previous definition" } */
+#define astr(x) a# x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%: x /* { dg-message "previous definition" } */
-#define astr(x) a #x /* { dg-warning "redefined" } */
+#define astr(x) a%: x /* { dg-message "-:previous definition" } */
+#define astr(x) a #x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%: x /* { dg-message "previous definition" } */
-#define astr(x) a %:x /* { dg-warning "redefined" } */
+#define astr(x) a%: x /* { dg-message "-:previous definition" } */
+#define astr(x) a %:x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%: x /* { dg-message "previous definition" } */
-#define astr(x) a # x /* { dg-warning "redefined" } */
+#define astr(x) a%: x /* { dg-message "-:previous definition" } */
+#define astr(x) a # x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a%: x /* { dg-message "previous definition" } */
-#define astr(x) a %: x /* { dg-warning "redefined" } */
+#define astr(x) a%: x /* { dg-message "-:previous definition" } */
+#define astr(x) a %: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a #x /* { dg-message "previous definition" } */
-#define astr(x) a#x /* { dg-warning "redefined" } */
+#define astr(x) a #x /* { dg-message "-:previous definition" } */
+#define astr(x) a#x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a #x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a #x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a #x /* { dg-message "previous definition" } */
-#define astr(x) a# x /* { dg-warning "redefined" } */
+#define astr(x) a #x /* { dg-message "-:previous definition" } */
+#define astr(x) a# x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a #x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a #x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a #x /* { dg-message "previous definition" } */
-#define astr(x) a %:x /* { dg-warning "redefined" } */
+#define astr(x) a #x /* { dg-message "-:previous definition" } */
+#define astr(x) a %:x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a #x /* { dg-message "previous definition" } */
-#define astr(x) a # x /* { dg-warning "redefined" } */
+#define astr(x) a #x /* { dg-message "-:previous definition" } */
+#define astr(x) a # x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a #x /* { dg-message "previous definition" } */
-#define astr(x) a %: x /* { dg-warning "redefined" } */
+#define astr(x) a #x /* { dg-message "-:previous definition" } */
+#define astr(x) a %: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %:x /* { dg-message "previous definition" } */
-#define astr(x) a#x /* { dg-warning "redefined" } */
+#define astr(x) a %:x /* { dg-message "-:previous definition" } */
+#define astr(x) a#x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %:x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a %:x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %:x /* { dg-message "previous definition" } */
-#define astr(x) a# x /* { dg-warning "redefined" } */
+#define astr(x) a %:x /* { dg-message "-:previous definition" } */
+#define astr(x) a# x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %:x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a %:x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %:x /* { dg-message "previous definition" } */
-#define astr(x) a #x /* { dg-warning "redefined" } */
+#define astr(x) a %:x /* { dg-message "-:previous definition" } */
+#define astr(x) a #x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %:x /* { dg-message "previous definition" } */
-#define astr(x) a # x /* { dg-warning "redefined" } */
+#define astr(x) a %:x /* { dg-message "-:previous definition" } */
+#define astr(x) a # x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %:x /* { dg-message "previous definition" } */
-#define astr(x) a %: x /* { dg-warning "redefined" } */
+#define astr(x) a %:x /* { dg-message "-:previous definition" } */
+#define astr(x) a %: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a # x /* { dg-message "previous definition" } */
-#define astr(x) a#x /* { dg-warning "redefined" } */
+#define astr(x) a # x /* { dg-message "-:previous definition" } */
+#define astr(x) a#x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a # x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a # x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a # x /* { dg-message "previous definition" } */
-#define astr(x) a# x /* { dg-warning "redefined" } */
+#define astr(x) a # x /* { dg-message "-:previous definition" } */
+#define astr(x) a# x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a # x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a # x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a # x /* { dg-message "previous definition" } */
-#define astr(x) a #x /* { dg-warning "redefined" } */
+#define astr(x) a # x /* { dg-message "-:previous definition" } */
+#define astr(x) a #x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a # x /* { dg-message "previous definition" } */
-#define astr(x) a %:x /* { dg-warning "redefined" } */
+#define astr(x) a # x /* { dg-message "-:previous definition" } */
+#define astr(x) a %:x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a # x /* { dg-message "previous definition" } */
-#define astr(x) a %: x /* { dg-warning "redefined" } */
+#define astr(x) a # x /* { dg-message "-:previous definition" } */
+#define astr(x) a %: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %: x /* { dg-message "previous definition" } */
-#define astr(x) a#x /* { dg-warning "redefined" } */
+#define astr(x) a %: x /* { dg-message "-:previous definition" } */
+#define astr(x) a#x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %: x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a %: x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %: x /* { dg-message "previous definition" } */
-#define astr(x) a# x /* { dg-warning "redefined" } */
+#define astr(x) a %: x /* { dg-message "-:previous definition" } */
+#define astr(x) a# x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %: x /* { dg-message "previous definition" } */
-#define astr(x) a%: x /* { dg-warning "redefined" } */
+#define astr(x) a %: x /* { dg-message "-:previous definition" } */
+#define astr(x) a%: x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %: x /* { dg-message "previous definition" } */
-#define astr(x) a #x /* { dg-warning "redefined" } */
+#define astr(x) a %: x /* { dg-message "-:previous definition" } */
+#define astr(x) a #x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %: x /* { dg-message "previous definition" } */
-#define astr(x) a %:x /* { dg-warning "redefined" } */
+#define astr(x) a %: x /* { dg-message "-:previous definition" } */
+#define astr(x) a %:x /* { dg-warning "-:redefined" } */
 #undef astr
-#define astr(x) a %: x /* { dg-message "previous definition" } */
-#define astr(x) a # x /* { dg-warning "redefined" } */
+#define astr(x) a %: x /* { dg-message "-:previous definition" } */
+#define astr(x) a # x /* { dg-warning "-:redefined" } */
 #undef astr
 
 #define astr(x) a#x
@@ -248,173 +248,173 @@
 #define astr(x) a %: x
 #undef astr
 
-#define cat(x,y) x##y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x##y /* { dg-message "previous definition" } */
-#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#define cat(x,y) x##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x##y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x##y /* { dg-message "previous definition" } */
-#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#define cat(x,y) x##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x##y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#define cat(x,y) x##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x##y /* { dg-message "previous definition" } */
-#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#define cat(x,y) x##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x##y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x## y /* { dg-message "previous definition" } */
-#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#define cat(x,y) x## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x## y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x## y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x## y /* { dg-message "previous definition" } */
-#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#define cat(x,y) x## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x## y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#define cat(x,y) x## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x## y /* { dg-message "previous definition" } */
-#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#define cat(x,y) x## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x## y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x%:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x%:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ##y /* { dg-message "previous definition" } */
-#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#define cat(x,y) x ##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ##y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x ##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ##y /* { dg-message "previous definition" } */
-#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#define cat(x,y) x ##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ##y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x ##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ##y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#define cat(x,y) x ##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ##y /* { dg-message "previous definition" } */
-#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#define cat(x,y) x ##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ##y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x ##y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%:y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%:y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ## y /* { dg-message "previous definition" } */
-#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#define cat(x,y) x ## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ## y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x ## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ## y /* { dg-message "previous definition" } */
-#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#define cat(x,y) x ## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ## y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x ## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ## y /* { dg-message "previous definition" } */
-#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#define cat(x,y) x ## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ## y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#define cat(x,y) x ## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x ## y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x ## y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x##y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x## y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x## y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x%:%: y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x%:%: y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x ##y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ##y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x %:%:y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x %:%:y /* { dg-warning "-:redefined" } */
 #undef cat
-#define cat(x,y) x %:%: y /* { dg-message "previous definition" } */
-#define cat(x,y) x ## y /* { dg-warning "redefined" } */
+#define cat(x,y) x %:%: y /* { dg-message "-:previous definition" } */
+#define cat(x,y) x ## y /* { dg-warning "-:redefined" } */
 #undef cat
 
 #define cat(x,y) x##y
@@ -442,28 +442,28 @@
 #define cat(x,y) x %:%: y
 #undef cat
 
-#define cat3(x,y,z) x##y##z /* { dg-message "previous definition" } */
-#define cat3(x,y,z) x##y####z /* { dg-warning "redefined" } */
+#define cat3(x,y,z) x##y##z /* { dg-message "-:previous definition" } */
+#define cat3(x,y,z) x##y####z /* { dg-warning "-:redefined" } */
 #undef cat3
 
-#define cat3(x,y,z) x##y####z /* { dg-message "previous definition" } */
-#define cat3(x,y,z) x####y##z /* { dg-warning "redefined" } */
+#define cat3(x,y,z) x##y####z /* { dg-message "-:previous definition" } */
+#define cat3(x,y,z) x####y##z /* { dg-warning "-:redefined" } */
 #undef cat3
 
-#define cat3(x,y,z) x##y####z /* { dg-message "previous definition" } */
-#define cat3(x,y,z) x##y## ##z /* { dg-warning "redefined" } */
+#define cat3(x,y,z) x##y####z /* { dg-message "-:previous definition" } */
+#define cat3(x,y,z) x##y## ##z /* { dg-warning "-:redefined" } */
 #undef cat3
 
-#define cat3(x,y,z) x##y####z /* { dg-message "previous definition" } */
-#define cat3(x,y,z) x##y##%:%:z /* { dg-warning "redefined" } */
+#define cat3(x,y,z) x##y####z /* { dg-message "-:previous definition" } */
+#define cat3(x,y,z) x##y##%:%:z /* { dg-warning "-:redefined" } */
 #undef cat3
 
-#define cat3(x,y,z) x##y######## ####z /* { dg-message "previous definition" } */
-#define cat3(x,y,z) x##y############z /* { dg-warning "redefined" } */
+#define cat3(x,y,z) x##y######## ####z /* { dg-message "-:previous definition" } */
+#define cat3(x,y,z) x##y############z /* { dg-warning "-:redefined" } */
 #undef cat3
 
-#define cat3(x,y,z) x##y############z /* { dg-message "previous definition" } */
-#define cat3(x,y,z) x##y########%:%:##z /* { dg-warning "redefined" } */
+#define cat3(x,y,z) x##y############z /* { dg-message "-:previous definition" } */
+#define cat3(x,y,z) x##y########%:%:##z /* { dg-warning "-:redefined" } */
 #undef cat3
 
 #define cat3(x,y,z) x##y##z
Index: gcc/testsuite/gcc.dg/cpp/trad/Wunused.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/Wunused.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/Wunused.c	(working copy)
@@ -14,9 +14,9 @@
 #define used3			/* { dg-bogus "used" } */
 #define used4 something		/* { dg-bogus "used" } */
 
-#define unused5			/* { dg-warning "used" } */
-#define unused6			/* { dg-warning "used" } */
-#define unused7()		/* { dg-warning "used" } */
+#define unused5			/* { dg-warning "-:used" } */
+#define unused6			/* { dg-warning "-:used" } */
+#define unused7()		/* { dg-warning "-:used" } */
 
 #if defined used1
 #endif
Index: gcc/testsuite/gcc.dg/cpp/trad/argcount.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/argcount.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/argcount.c	(working copy)
@@ -7,15 +7,15 @@
 #define g(x, y) x y
 #define h()
 
-f(); 		/* { dg-bogus "requires 1" "no arg is 1 empty arg" } */
-f( ); 		/* { dg-bogus "macro" "1 arg to 1 param macro" } */
-f(1,); 		/* { dg-error "passed 2" "2 args to 1 param macro" } */
-f(1,2);		/* { dg-error "passed 2" "2 args to 1 param macro" } */
-h();		/* { dg-bogus "macro" "no arg to 1 param macro" } */
-h( );		/* { dg-error "passed 1" "1 arg to 0 param macro" } */
-h(1,2);		/* { dg-error "passed 2" "2 args to 0 param macro" } */
-g();		/* { dg-error "requires 2" "0 args to 2 param macro" } */
-g( );		/* { dg-error "requires 2" "1 args to 2 param macro" } */
-g( ,2);		/* { dg-bogus "requires 2" "2 args to 2 param macro" } */
-g(,);		/* { dg-bogus "requires 2" "2 args to 2 param macro" } */
-g(1,2,3);	/* { dg-error "passed 3" "3 args to 2 param macro" } */
+f(); 		/* { dg-bogus "-:requires 1" "no arg is 1 empty arg" } */
+f( ); 		/* { dg-bogus "-:macro" "1 arg to 1 param macro" } */
+f(1,); 		/* { dg-error "-:passed 2" "2 args to 1 param macro" } */
+f(1,2);		/* { dg-error "-:passed 2" "2 args to 1 param macro" } */
+h();		/* { dg-bogus "-:macro" "no arg to 1 param macro" } */
+h( );		/* { dg-error "-:passed 1" "1 arg to 0 param macro" } */
+h(1,2);		/* { dg-error "-:passed 2" "2 args to 0 param macro" } */
+g();		/* { dg-error "-:requires 2" "0 args to 2 param macro" } */
+g( );		/* { dg-error "-:requires 2" "1 args to 2 param macro" } */
+g( ,2);		/* { dg-bogus "-:requires 2" "2 args to 2 param macro" } */
+g(,);		/* { dg-bogus "-:requires 2" "2 args to 2 param macro" } */
+g(1,2,3);	/* { dg-error "-:passed 3" "3 args to 2 param macro" } */
Index: gcc/testsuite/gcc.dg/cpp/trad/comment-3.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/comment-3.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/comment-3.c	(working copy)
@@ -3,4 +3,4 @@
 /* { dg-do preprocess } */
 
 #if 0
-#endif //  /* { dg-warning "extra tokens" } */
+#endif //  /* { dg-warning "-:extra tokens" } */
Index: gcc/testsuite/gcc.dg/cpp/trad/comment.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/comment.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/comment.c	(working copy)
@@ -2,4 +2,4 @@
 
 /* { dg-do preprocess } */
 
-/* { dg-error "unterminated comment" }
+/* { dg-error "-:unterminated comment" }
Index: gcc/testsuite/gcc.dg/cpp/trad/defined.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/defined.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/defined.c	(working copy)
@@ -16,7 +16,7 @@
 #error REGPARMS should be defined
 #endif
 
-#define defined			/* { dg-error "defined" } */
+#define defined			/* { dg-error "-:defined" } */
 
 /* No diagnostics, though you could argue there should be.  */
 #if defined defined
Index: gcc/testsuite/gcc.dg/cpp/trad/directive.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/directive.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/directive.c	(working copy)
@@ -12,7 +12,7 @@ HASH
 /* Directives with their #s indented are not recognized.  */
  #if 0	/* { dg-bogus "unterminated" } */
 
-#wrong	/* { dg-error "invalid" } */
+#wrong	/* { dg-error "-:invalid" } */
 
 #define foo 2
 #define bar + 3
Index: gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c	(working copy)
@@ -5,8 +5,8 @@
 
 #define f(x) x
 
-#if 2 f(/* { dg-error "unterminated" "unterminated macro in directive" } */
+#if 2 f(/* { dg-error "-:unterminated" "unterminated macro in directive" } */
 )
 #endif
 
-f( /* { dg-error "unterminated" "unterminated macro" } */
+f( /* { dg-error "-:unterminated" "unterminated macro" } */
Index: gcc/testsuite/gcc.dg/cpp/trad/funlike.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/funlike.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/funlike.c	(working copy)
@@ -21,5 +21,5 @@
 # error		/* { dg-bogus "error" "empty macro" } */
 #endif
 
-#if f paren 6) /* { dg-error "missing binary" "macro-expanded parenthesis" } */
+#if f paren 6) /* { dg-error "-:missing binary" "macro-expanded parenthesis" } */
 #endif
Index: gcc/testsuite/gcc.dg/cpp/trad/literals-2.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/literals-2.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/literals-2.c	(working copy)
@@ -2,7 +2,7 @@
    recognized.  */
 
 /* { dg-do preprocess } */
-/* { dg-warning "missing terminating" "bad charconst" { target *-*-* } .+2 } */
-/* { dg-error "not valid" "bad charconst" { target *-*-* } .+1 } */
+/* { dg-warning "-:missing terminating" "bad charconst" { target *-*-* } .+2 } */
+/* { dg-error "-:not valid" "bad charconst" { target *-*-* } .+1 } */
 #if 'x
 #endif
Index: gcc/testsuite/gcc.dg/cpp/trad/macro.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/macro.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/macro.c	(working copy)
@@ -4,7 +4,7 @@
 /* { dg-do preprocess } */
 
 #define f(x) 
-#define g(x, y...)		/* { dg-error "macro parameter list" } */
+#define g(x, y...)		/* { dg-error "-:macro parameter list" } */
 
 #if 0
 #define f(a,b)			/* { dg-bogus "passed 2 arguments" } */
Index: gcc/testsuite/gcc.dg/cpp/trad/pr65238-4.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/pr65238-4.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/pr65238-4.c	(working copy)
@@ -11,9 +11,9 @@
 #if __has_attribute(__has_attribute(unused))
 #endif
 
-/* { dg-error "unterminated argument list invoking macro .__has_attribute." "" {target "*-*-*"} 5 } */
-/* { dg-error "#if with no expression" "" {target "*-*-*"} 5 } */
-/* { dg-error "unterminated argument list invoking macro .__has_attribute." "" {target "*-*-*"} 7 } */
-/* { dg-error "macro .__has_attribute. passed 2 arguments, but takes just 1" "" {target "*-*-*"} 9 } */
-/* { dg-error "missing ... in expression" "" {target "*-*-*"} 9 } */
-/* { dg-error "macro .__has_attribute. requires an identifier" "" {target "*-*-*"} 11 } */
+/* { dg-error "-:unterminated argument list invoking macro .__has_attribute." "" {target "*-*-*"} 5 } */
+/* { dg-error "-:#if with no expression" "" {target "*-*-*"} 5 } */
+/* { dg-error "-:unterminated argument list invoking macro .__has_attribute." "" {target "*-*-*"} 7 } */
+/* { dg-error "-:macro .__has_attribute. passed 2 arguments, but takes just 1" "" {target "*-*-*"} 9 } */
+/* { dg-error "-:missing ... in expression" "" {target "*-*-*"} 9 } */
+/* { dg-error "-:macro .__has_attribute. requires an identifier" "" {target "*-*-*"} 11 } */
Index: gcc/testsuite/gcc.dg/cpp/trad/recurse-1.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/recurse-1.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/recurse-1.c	(working copy)
@@ -4,7 +4,7 @@
 /* { dg-do preprocess } */
 
 #define foo foo
-foo				/* { dg-error "detected recursion" } */
+foo				/* { dg-error "-:detected recursion" } */
 
 #define bar a bar b
-bar				/* { dg-error "detected recursion" } */
+bar				/* { dg-error "-:detected recursion" } */
Index: gcc/testsuite/gcc.dg/cpp/trad/recurse-2.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/recurse-2.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/recurse-2.c	(working copy)
@@ -4,13 +4,13 @@
 /* { dg-do preprocess } */
 
 #define foo() foo()
-foo();				/* { dg-error "detected recursion" } */
+foo();				/* { dg-error "-:detected recursion" } */
 
 #define bar() bar baz() bar
 bar();				/* { dg-bogus "detected recursion" } */
 
 #define baz() foo()
-baz();			       /* { dg-error "detected recursion" } */
+baz();			       /* { dg-error "-:detected recursion" } */
 
 #define a(x) x(a)
-a(a);			       /* { dg-error "detected recursion" } */
+a(a);			       /* { dg-error "-:detected recursion" } */
Index: gcc/testsuite/gcc.dg/cpp/trad/redef2.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/redef2.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/trad/redef2.c	(working copy)
@@ -2,31 +2,31 @@
 
 /* { dg-do preprocess } */
 
-#define foo bar    /* { dg-message "previous def" "foo prev def" } */
-#define foo barr   /* { dg-warning "redefined" "foo redefined" } */
+#define foo bar    /* { dg-message "-:previous def" "foo prev def" } */
+#define foo barr   /* { dg-warning "-:redefined" "foo redefined" } */
 
 #undef foo
-#define foo bar    /* { dg-message "previous def" "foo prev def 2" } */
-#define foo() bar    /* { dg-warning "redefined" "foo redefined 2" } */
+#define foo bar    /* { dg-message "-:previous def" "foo prev def 2" } */
+#define foo() bar    /* { dg-warning "-:redefined" "foo redefined 2" } */
 
 #undef foo
-#define foo() bar    /* { dg-message "previous def" "foo prev def" } */
-#define foo() barr   /* { dg-warning "redefined" "foo redefined" } */
+#define foo() bar    /* { dg-message "-:previous def" "foo prev def" } */
+#define foo() barr   /* { dg-warning "-:redefined" "foo redefined" } */
 
-#define quux(thud) a thud b /* { dg-message "previous def" "quux prev def" } */
-#define quux(thu) a thud b   /* { dg-warning "redefined" "quux redefined" } */
+#define quux(thud) a thud b /* { dg-message "-:previous def" "quux prev def" } */
+#define quux(thu) a thud b   /* { dg-warning "-:redefined" "quux redefined" } */
 
-#define bar(x, y) x+y /* { dg-message "previous def" "bar prev def" } */
-#define bar(x, y) x+x   /* { dg-warning "redefined" "bar redefined" } */
+#define bar(x, y) x+y /* { dg-message "-:previous def" "bar prev def" } */
+#define bar(x, y) x+x   /* { dg-warning "-:redefined" "bar redefined" } */
 
-#define bat(x, y) x+y  /* { dg-message "previous def" "bat prev def" } */
-#define bat(x, y) x+ y   /* { dg-warning "redefined" "bat redefined" } */
+#define bat(x, y) x+y  /* { dg-message "-:previous def" "bat prev def" } */
+#define bat(x, y) x+ y   /* { dg-warning "-:redefined" "bat redefined" } */
 
-#define baz(x, y) x+y  /* { dg-message "previous def" "baz prev def" } */
-#define baz(x, y) x +y   /* { dg-warning "redefined" "baz redefined" } */
+#define baz(x, y) x+y  /* { dg-message "-:previous def" "baz prev def" } */
+#define baz(x, y) x +y   /* { dg-warning "-:redefined" "baz redefined" } */
 
-#define f(x, y) "x y"  /* { dg-message "previous def" "f prev def" } */
-#define f(x, y) "x  y"   /* { dg-warning "redefined" "f redefined" } */
+#define f(x, y) "x y"  /* { dg-message "-:previous def" "f prev def" } */
+#define f(x, y) "x  y"   /* { dg-warning "-:redefined" "f redefined" } */
 
-#define g(x, y) 'x'  /* { dg-message "previous def" "g prev def" } */
-#define g(x, y) ' x'   /* { dg-warning "redefined" "g redefined" } */
+#define g(x, y) 'x'  /* { dg-message "-:previous def" "g prev def" } */
+#define g(x, y) ' x'   /* { dg-warning "-:redefined" "g redefined" } */
Index: gcc/testsuite/gcc.dg/cpp/ucnid-11.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/ucnid-11.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/ucnid-11.c	(working copy)
@@ -4,23 +4,23 @@
 /* { dg-options "-std=c99 -pedantic-errors" } */
 
 /* Different spelling of UCN in expansion.  */
-#define m1 \u00c1 /* { dg-message "previous definition" } */
-#define m1 \u00C1 /* { dg-error "redefined" } */
+#define m1 \u00c1 /* { dg-message "-:previous definition" } */
+#define m1 \u00C1 /* { dg-error "-:redefined" } */
 
 #define m1ok \u00c1
 #define m1ok \u00c1
 
 /* Different spelling of UCN in argument name.  */
-#define m2(\u00c1) /* { dg-message "previous definition" } */
-#define m2(\u00C1) /* { dg-error "redefined" } */
+#define m2(\u00c1) /* { dg-message "-:previous definition" } */
+#define m2(\u00C1) /* { dg-error "-:redefined" } */
 
 #define m2ok(\u00c1)
 #define m2ok(\u00c1)
 
 /* Same spelling in argument name but different spelling when used in
    expansion.  */
-#define m3(\u00c1) \u00c1 /* { dg-message "previous definition" } */
-#define m3(\u00c1) \u00C1 /* { dg-error "redefined" } */
+#define m3(\u00c1) \u00c1 /* { dg-message "-:previous definition" } */
+#define m3(\u00c1) \u00C1 /* { dg-error "-:redefined" } */
 
 #define m3ok(\u00c1) \u00C1
 #define m3ok(\u00c1) \u00C1
Index: gcc/testsuite/gcc.dg/cpp/unc1.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/unc1.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/unc1.c	(working copy)
@@ -1,7 +1,7 @@
 /* Tests for un-terminated conditionals: 1.  */
 /* { dg-do preprocess } */
 
-#if 1  /* { dg-error "unterminated" "unterminated #if" } */
+#if 1  /* { dg-error "-:unterminated" "unterminated #if" } */
 
 #ifdef notdef /* { dg-bogus "unterminated" "nested terminated #ifdef" } */
 
Index: gcc/testsuite/gcc.dg/cpp/unc2.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/unc2.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/unc2.c	(working copy)
@@ -1,7 +1,7 @@
 /* Tests for unterminated conditionals: 2.  */
 /* { dg-do preprocess } */
 
-#ifdef __sparc__  /* { dg-error "unterminated" "unterminated if-elif-elif..." } */
+#ifdef __sparc__  /* { dg-error "-:unterminated" "unterminated if-elif-elif..." } */
 sparc
 #elif defined __powerpc__
 ppc
Index: gcc/testsuite/gcc.dg/cpp/unc3.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/unc3.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/unc3.c	(working copy)
@@ -1,5 +1,5 @@
 /* Tests for unterminated conditionals: 3.  */
 /* { dg-do preprocess } */
 
-#if 1  /* { dg-error "#else" "unterminated #else" } */
+#if 1  /* { dg-error "-:#else" "unterminated #else" } */
 #else
Index: gcc/testsuite/gcc.dg/cpp/unc4.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/unc4.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/unc4.c	(working copy)
@@ -36,4 +36,4 @@ ignored
 
 /* dg.exp doesn't read the included files for tags, so we have to
    do them explicitly here.  */
-/* { dg-error "#if" "unc1.c: unterminated #if" { target *-*-* } 4 } */
+/* { dg-error "-:#if" "unc1.c: unterminated #if" { target *-*-* } 4 } */
Index: gcc/testsuite/gcc.dg/cpp/undef2.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/undef2.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/undef2.c	(working copy)
@@ -3,11 +3,11 @@
 
 /* { dg-do preprocess } */
 
-#undef __DATE__		/* { dg-warning "undefining" "__DATE__" } */
-#undef __TIME__		/* { dg-warning "undefining" "__TIME__" } */
-#undef __FILE__		/* { dg-warning "undefining" "__FILE__" } */
-#undef __LINE__		/* { dg-warning "undefining" "__LINE__" } */
-#undef __STDC__		/* { dg-warning "undefining" "__STDC__" } */
+#undef __DATE__		/* { dg-warning "-:undefining \"__DATE__\"" } */
+#undef __TIME__		/* { dg-warning "-:undefining \"__TIME__\"" } */
+#undef __FILE__		/* { dg-warning "-:undefining \"__FILE__\"" } */
+#undef __LINE__		/* { dg-warning "undefining \"__LINE__\"" } */
+#undef __STDC__		/* { dg-warning "undefining \"__STDC__\"" } */
 
 /* These should be protected from #undef, but aren't, because they
    are set with normal #define commands - and on top of that, some
Index: gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/warn-redefined-2.c	(working copy)
@@ -6,13 +6,13 @@
 // { dg-bogus "__TIME__ builtin is not defined" "no-time" { target *-*-* } .-1 }
 #endif
 
-#define __TIME__ "X"  // { dg-error "\"__TIME__\" redefined .-Werror=builtin-macro-redefined." }
+#define __TIME__ "X"  // { dg-error "-:\"__TIME__\" redefined .-Werror=builtin-macro-redefined." }
 
 #define __TIME__ "Y"  // { dg-bogus "-Wbuiltin-macro-redefined" }
-                      // { dg-warning "\"__TIME__\" redefined" "not-builtin-1" { target *-*-* } .-1 }
-                      // { dg-message "previous definition" "previous-1" { target *-*-* } 9 }
+                      // { dg-warning "-:\"__TIME__\" redefined" "not-builtin-1" { target *-*-* } .-1 }
+                      // { dg-message "-:previous definition" "previous-1" { target *-*-* } 9 }
 
 #define X "X"
 #define X "Y"         // { dg-bogus "-Wbuiltin-macro-redefined" }
-                      // { dg-warning "\"X\" redefined" "not-builtin-2" { target *-*-* } .-1 }
-                      // { dg-message "previous definition" "previous-2" { target *-*-* } 15 }
+                      // { dg-warning "-:\"X\" redefined" "not-builtin-2" { target *-*-* } .-1 }
+                      // { dg-message "-:previous definition" "previous-2" { target *-*-* } 15 }
Index: gcc/testsuite/gcc.dg/cpp/warn-redefined.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/warn-redefined.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/warn-redefined.c	(working copy)
@@ -6,13 +6,13 @@
 // { dg-bogus "__TIME__ builtin is not defined" "no-time" { target *-*-* } .-1 }
 #endif
 
-#define __TIME__ "X"  // { dg-warning "\"__TIME__\" redefined .-Wbuiltin-macro-redefined." }
+#define __TIME__ "X"  // { dg-warning "-:\"__TIME__\" redefined .-Wbuiltin-macro-redefined." }
 
 #define __TIME__ "Y"  // { dg-bogus "-Wbuiltin-macro-redefined" }
-                      // { dg-warning "\"__TIME__\" redefined" "not-builtin-1" { target *-*-* } .-1 }
-                      // { dg-message "previous definition" "previous-1" { target *-*-* } 9 }
+                      // { dg-warning "-:\"__TIME__\" redefined" "not-builtin-1" { target *-*-* } .-1 }
+                      // { dg-message "-:previous definition" "previous-1" { target *-*-* } 9 }
 
 #define X "X"
 #define X "Y"         // { dg-bogus "-Wbuiltin-macro-redefined" }
-                      // { dg-warning "\"X\" redefined" "not-builtin-2" { target *-*-* } .-1 }
-                      // { dg-message "previous definition" "previous-2" { target *-*-* } 15 }
+                      // { dg-warning "-:\"X\" redefined" "not-builtin-2" { target *-*-* } .-1 }
+                      // { dg-message "-:previous definition" "previous-2" { target *-*-* } 15 }
Index: gcc/testsuite/gcc.dg/cpp/warn-unused-macros-2.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/warn-unused-macros-2.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/warn-unused-macros-2.c	(working copy)
@@ -1,4 +1,4 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=unused-macros" }
 /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
-#define X X  // { dg-error "macro \"X\" is not used .-Werror=unused-macros." }
+#define X X  // { dg-error "-:macro \"X\" is not used .-Werror=unused-macros." }
Index: gcc/testsuite/gcc.dg/cpp/warn-unused-macros.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/warn-unused-macros.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/cpp/warn-unused-macros.c	(working copy)
@@ -1,4 +1,4 @@
 // { dg-do preprocess }
 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wunused-macros" }
 
-#define X X  // { dg-warning "macro \"X\" is not used .-Wunused-macros." }
+#define X X  // { dg-warning "-:macro \"X\" is not used .-Wunused-macros." }
Index: gcc/testsuite/gcc.dg/empty-source-2.c
===================================================================
--- gcc/testsuite/gcc.dg/empty-source-2.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/empty-source-2.c	(working copy)
@@ -3,4 +3,4 @@
 /* { dg-do compile } */
 /* { dg-options "-pedantic" } */
 
-/* { dg-warning "ISO C forbids an empty translation unit" "empty" } */
+/* { dg-warning "-:ISO C forbids an empty translation unit" "empty" } */
Index: gcc/testsuite/gcc.dg/empty-source-3.c
===================================================================
--- gcc/testsuite/gcc.dg/empty-source-3.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/empty-source-3.c	(working copy)
@@ -4,4 +4,4 @@
 /* { dg-do compile } */
 /* { dg-options "-pedantic-errors" } */
 
-/* { dg-error "ISO C forbids an empty translation unit" "empty" } */
+/* { dg-error "-:ISO C forbids an empty translation unit" "empty" } */
Index: gcc/testsuite/gcc.dg/gomp/macro-4.c
===================================================================
--- gcc/testsuite/gcc.dg/gomp/macro-4.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/gomp/macro-4.c	(working copy)
@@ -10,9 +10,9 @@ void bar (void);
 void
 foo (void)
 {
-#pragma omp p		/* { dg-warning "ignoring #pragma omp _Pragma" } */
+#pragma omp p		/* { dg-warning "-:ignoring #pragma omp _Pragma" } */
     bar ();
-  omp_p			/* { dg-warning "ignoring #pragma omp _Pragma" } */
+  omp_p			/* { dg-warning "-:ignoring #pragma omp _Pragma" } */
     bar ();
 }
 
@@ -22,8 +22,8 @@ foo (void)
 void
 baz (void)
 {
-#pragma omp parallel	/* { dg-warning "ignoring #pragma omp serial" } */
+#pragma omp parallel	/* { dg-warning "-:ignoring #pragma omp serial" } */
     bar ();
-  omp_parallel		/* { dg-warning "ignoring #pragma omp serial" } */
+  omp_parallel		/* { dg-warning "-:ignoring #pragma omp serial" } */
     bar ();
 }
Index: gcc/testsuite/gcc.dg/noncompile/pr35447-1.c
===================================================================
--- gcc/testsuite/gcc.dg/noncompile/pr35447-1.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/noncompile/pr35447-1.c	(working copy)
@@ -4,4 +4,4 @@
 void foo()
 {
   ({ int i().; }); /* { dg-error "expected" } */
-} /* { dg-error "expected" } */
+} /* { dg-error "-:expected" } */
Index: gcc/testsuite/gcc.dg/plugin/location-overflow-test-1.c
===================================================================
--- gcc/testsuite/gcc.dg/plugin/location-overflow-test-1.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/plugin/location-overflow-test-1.c	(working copy)
@@ -5,7 +5,7 @@
    numbers are available.  */
 
 /* Verify that we're in column-less mode.  */
-extern unknown_type test; /* { dg-error "0: unknown type name" } */
+extern unknown_type test; /* { dg-error "-:unknown type name" } */
 
 /* PR c++/68819: verify that -Wmisleading-indentation is suppressed.  */
 
@@ -13,7 +13,7 @@ int
 fn_1 (int flag)
 {
   int x = 4, y = 5;
-  if (flag) x = 3; y = 2; /* { dg-message "disabled from this point" } */
+  if (flag) x = 3; y = 2; /* { dg-message "-:disabled from this point" } */
   return x * y;
 }
 
Index: gcc/testsuite/gcc.dg/pr20245-1.c
===================================================================
--- gcc/testsuite/gcc.dg/pr20245-1.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/pr20245-1.c	(working copy)
@@ -2,4 +2,4 @@
 /* { dg-do compile } */
 /* { dg-options "" } */
 
-void foo() x; /* { dg-error "expected" } */
+void foo() x; /* { dg-error "-:expected" } */
Index: gcc/testsuite/gcc.dg/pr28419.c
===================================================================
--- gcc/testsuite/gcc.dg/pr28419.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/pr28419.c	(working copy)
@@ -1,3 +1,4 @@
 /* { dg-do compile } */
 void foo() 
 const char* p = __FUNCTION__; /* { dg-error "" } */
+/* { dg-error "-:expected" "" } */
Index: gcc/testsuite/gcc.dg/rtl/truncated-rtl-file.c
===================================================================
--- gcc/testsuite/gcc.dg/rtl/truncated-rtl-file.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/rtl/truncated-rtl-file.c	(working copy)
@@ -1,2 +1,2 @@
 void __RTL test (void)
-{ /* { dg-error "no closing brace" } */
+{ /* { dg-error "-:no closing brace" } */
Index: gcc/testsuite/gcc.dg/unclosed-init.c
===================================================================
--- gcc/testsuite/gcc.dg/unclosed-init.c	(revision 254060)
+++ gcc/testsuite/gcc.dg/unclosed-init.c	(working copy)
@@ -1,3 +1,3 @@
 int unclosed[] = { /* { dg-message "18: to match this '.'" } */
   42
- /* { dg-error "0: expected '.' at end of input" } */
+ /* { dg-error "-: expected '.' at end of input" } */
Index: gcc/testsuite/lib/gcc-dg.exp
===================================================================
--- gcc/testsuite/lib/gcc-dg.exp	(revision 254060)
+++ gcc/testsuite/lib/gcc-dg.exp	(working copy)
@@ -1092,24 +1092,27 @@ proc process-message { msgproc msgprefix
     set newentry [lindex ${dg-messages} end]
     set expmsg [lindex $newentry 2]
 
+    set column ""
     # Handle column numbers from the specified expression (if there is
     # one) and set up the search expression that will be used by DejaGnu.
-    if [regexp "^(\[0-9\]+):" $expmsg "" column] {
+    if [regexp {^-:} $expmsg] {
+	# The expected column is -, so shouldn't appear.
+	set expmsg [string range $expmsg 2 end]
+    } elseif [regexp {^[0-9]+:} $expmsg column] {
 	# The expression in the directive included a column number.
-	# Remove "COLUMN:" from the original expression and move it
+	# Remove it from the original expression and move it
 	# to the proper place in the search expression.
-	regsub "^\[0-9\]+:" $expmsg "" expmsg
-	set expmsg "$column: $msgprefix\[^\n\]*$expmsg"
+	set expmsg [string range $expmsg [string length $column] end]
     } elseif [string match "" [lindex $newentry 0]] {
 	# The specified line number is 0; don't expect a column number.
-	set expmsg "$msgprefix\[^\n\]*$expmsg"
     } else {
 	# There is no column number in the search expression, but we
 	# should expect one in the message itself.
-	set expmsg "\[0-9\]+: $msgprefix\[^\n\]*$expmsg"
+	set column {[0-9]+:}
     }
-
+    set expmsg "$column $msgprefix\[^\n\]*$expmsg"
     set newentry [lreplace $newentry 2 2 $expmsg]
+
     set dg-messages [lreplace ${dg-messages} end end $newentry]
     verbose "process-message:\n${dg-messages}" 2
 }

Reply via email to