diff mbox series

[C++] Another bunch of location fixes for decl.c/decl2.c functions

Message ID dcc75942-35b2-55ed-4dae-1c4001d16715@oracle.com
State New
Headers show
Series [C++] Another bunch of location fixes for decl.c/decl2.c functions | expand

Commit Message

Paolo Carlini June 14, 2018, 2:48 p.m. UTC
Hi,

tested x86_64 linux.

Thanks, Paolo.

///////////////////////
/cp
2018-06-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (duplicate_decls): Use DECL_SOURCE_LOCATION in
	OPT_Wshadow warning_at.
	(grokfndecl): Consistently use the location_t argument in
	literal operator diagnostic messages.
	(grokdeclarator): Use declspecs->locations[ds_storage_class]
	in error_at call.
	decl2.c (finish_static_data_member_decl): Use DECL_SOURCE_LOCATION
	in permerror call.

/testsuite
2018-06-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/other/static3.C: New.
	* g++.dg/other/static4.C: Likewise.
	* g++.dg/warn/Wshadow-15.C: Likewise.
	* g++.dg/cpp0x/gnu_fext-numeric-literals.C: Test locations too.
	* g++.dg/cpp0x/std_fext-numeric-literals.C: Likewise.
	* g++.dg/cpp0x/std_fno-ext-numeric-literals.C: Likewise.
	* g++.dg/cpp0x/udlit-args-neg.C: Likewise.
	* g++.dg/cpp0x/udlit-clink-neg.C: Likewise.
	* g++.dg/cpp0x/udlit-extern-c.C: Likewise.
	* g++.dg/cpp0x/udlit-member-neg.C: Likewise.

Comments

Jason Merrill June 14, 2018, 4:44 p.m. UTC | #1
OK.

On Thu, Jun 14, 2018 at 10:48 AM, Paolo Carlini
<paolo.carlini@oracle.com> wrote:
> Hi,
>
> tested x86_64 linux.
>
> Thanks, Paolo.
>
> ///////////////////////
>
diff mbox series

Patch

Index: cp/decl.c
===================================================================
--- cp/decl.c	(revision 261586)
+++ cp/decl.c	(working copy)
@@ -1398,10 +1398,11 @@  duplicate_decls (tree newdecl, tree olddecl, bool
 	     bad choice of name.  */
 	  if (! TREE_PUBLIC (newdecl))
 	    {
-	      warning (OPT_Wshadow, 
-                       DECL_BUILT_IN (olddecl)
-                       ? G_("shadowing built-in function %q#D")
-                       : G_("shadowing library function %q#D"), olddecl);
+	      warning_at (DECL_SOURCE_LOCATION (newdecl),
+			  OPT_Wshadow, 
+			  DECL_BUILT_IN (olddecl)
+			  ? G_("shadowing built-in function %q#D")
+			  : G_("shadowing library function %q#D"), olddecl);
 	      /* Discard the old built-in function.  */
 	      return NULL_TREE;
 	    }
@@ -8863,7 +8864,7 @@  grokfndecl (tree ctype,
       /* [over.literal]/6: Literal operators shall not have C linkage. */
       if (DECL_LANGUAGE (decl) == lang_c)
 	{
-	  error ("literal operator with C linkage");
+	  error_at (location, "literal operator with C linkage");
 	  maybe_show_extern_c_location ();
 	  return NULL_TREE;
 	}
@@ -8873,7 +8874,7 @@  grokfndecl (tree ctype,
 	  if (!check_literal_operator_args (decl, &long_long_unsigned_p,
 					    &long_double_p))
 	    {
-	      error ("%qD has invalid argument list", decl);
+	      error_at (location, "%qD has invalid argument list", decl);
 	      return NULL_TREE;
 	    }
 
@@ -8881,26 +8882,26 @@  grokfndecl (tree ctype,
 	  if (long_long_unsigned_p)
 	    {
 	      if (cpp_interpret_int_suffix (parse_in, suffix, strlen (suffix)))
-		warning (0, "integer suffix %qs"
+		warning_at (location, 0, "integer suffix %qs"
 			    " shadowed by implementation", suffix);
 	    }
 	  else if (long_double_p)
 	    {
 	      if (cpp_interpret_float_suffix (parse_in, suffix, strlen (suffix)))
-		warning (0, "floating point suffix %qs"
+		warning_at (location, 0, "floating point suffix %qs"
 			    " shadowed by implementation", suffix);
 	    }
 	  /* 17.6.3.3.5  */
 	  if (suffix[0] != '_'
-	      && !in_system_header_at (DECL_SOURCE_LOCATION (decl))
+	      && !in_system_header_at (location)
 	      && !current_function_decl && !(friendp && !funcdef_flag))
-	    warning (OPT_Wliteral_suffix,
-		     "literal operator suffixes not preceded by %<_%>"
-		     " are reserved for future standardization");
+	    warning_at (location, OPT_Wliteral_suffix,
+			"literal operator suffixes not preceded by %<_%>"
+			" are reserved for future standardization");
 	}
       else
 	{
-	  error ("%qD must be a non-member function", decl);
+	  error_at (location, "%qD must be a non-member function", decl);
 	  return NULL_TREE;
 	}
     }
@@ -12408,7 +12409,8 @@  grokdeclarator (const cp_declarator *declarator,
 	      {
 		/* 7.1.1: There can be no static function declarations within a
 		   block.  */
-		error ("cannot declare static function inside another function");
+		error_at (declspecs->locations[ds_storage_class],
+			  "cannot declare static function inside another function");
 		invalid_static = 1;
 	      }
 
Index: cp/decl2.c
===================================================================
--- cp/decl2.c	(revision 261586)
+++ cp/decl2.c	(working copy)
@@ -756,7 +756,8 @@  finish_static_data_member_decl (tree decl,
   if (LOCAL_CLASS_P (current_class_type)
       /* We already complained about the template definition.  */
       && !DECL_TEMPLATE_INSTANTIATION (decl))
-    permerror (input_location, "local class %q#T shall not have static data member %q#D",
+    permerror (DECL_SOURCE_LOCATION (decl),
+	       "local class %q#T shall not have static data member %q#D",
 	       current_class_type, decl);
   else
     for (tree t = current_class_type; TYPE_P (t);
Index: testsuite/g++.dg/cpp0x/gnu_fext-numeric-literals.C
===================================================================
--- testsuite/g++.dg/cpp0x/gnu_fext-numeric-literals.C	(revision 261586)
+++ testsuite/g++.dg/cpp0x/gnu_fext-numeric-literals.C	(working copy)
@@ -4,73 +4,73 @@ 
 //  Integer imaginary...
 
 constexpr unsigned long long
-operator"" i(unsigned long long n) // { dg-warning "shadowed by implementation" "" { target c++11_only } }
+operator"" i(unsigned long long n) // { dg-warning "1:integer suffix .i. shadowed by implementation" "" { target c++11_only } }
 { return 4 * n + 0; }
 
 constexpr unsigned long long
-operator"" I(unsigned long long n) // { dg-warning "shadowed by implementation" }
+operator"" I(unsigned long long n) // { dg-warning "1:integer suffix .I. shadowed by implementation" }
 { return 4 * n + 1; }
 
 constexpr unsigned long long
-operator"" j(unsigned long long n) // { dg-warning "shadowed by implementation" }
+operator"" j(unsigned long long n) // { dg-warning "1:integer suffix .j. shadowed by implementation" }
 { return 4 * n + 2; }
 
 constexpr unsigned long long
-operator"" J(unsigned long long n) // { dg-warning "shadowed by implementation" }
+operator"" J(unsigned long long n) // { dg-warning "1:integer suffix .J. shadowed by implementation" }
 { return 4 * n + 3; }
 
 //  Floating-point imaginary...
 
 constexpr long double
-operator"" i(long double n) // { dg-warning "shadowed by implementation" "" { target c++11_only } }
+operator"" i(long double n) // { dg-warning "1:floating point suffix .i. shadowed by implementation" "" { target c++11_only } }
 { return 4.0L * n + 0.0L; }
 
 constexpr long double
-operator"" I(long double n) // { dg-warning "shadowed by implementation" }
+operator"" I(long double n) // { dg-warning "1:floating point suffix .I. shadowed by implementation" }
 { return 4.0L * n + 1.0L; }
 
 constexpr long double
-operator"" j(long double n) // { dg-warning "shadowed by implementation" }
+operator"" j(long double n) // { dg-warning "1:floating point suffix .j. shadowed by implementation" }
 { return 4.0L * n + 2.0L; }
 
 constexpr long double
-operator"" J(long double n) // { dg-warning "shadowed by implementation" }
+operator"" J(long double n) // { dg-warning "1:floating point suffix .J. shadowed by implementation" }
 { return 4.0L * n + 3.0L; }
 
 //  Fixed-point...
 
 constexpr long double
-operator"" k(long double n) // { dg-warning "shadowed by implementation" }
+operator"" k(long double n) // { dg-warning "1:floating point suffix .k. shadowed by implementation" }
 { return 4 * (n + 1) + 0; }
 
 constexpr long double
-operator"" K(long double n) // { dg-warning "shadowed by implementation" }
+operator"" K(long double n) // { dg-warning "1:floating point suffix .K. shadowed by implementation" }
 { return 4 * (n + 1) + 1; }
 
 constexpr long double
-operator"" r(long double n) // { dg-warning "shadowed by implementation" }
+operator"" r(long double n) // { dg-warning "1:floating point suffix .r. shadowed by implementation" }
 { return 4 * (n + 1) + 2; }
 
 constexpr long double
-operator"" R(long double n) // { dg-warning "shadowed by implementation" }
+operator"" R(long double n) // { dg-warning "1:floating point suffix .R. shadowed by implementation" }
 { return 4 * (n + 1) + 3; }
 
 //  Machine-defined...
 
 constexpr long double
-operator"" w(long double n) // { dg-warning "shadowed by implementation" }
+operator"" w(long double n) // { dg-warning "1:floating point suffix .w. shadowed by implementation" }
 { return 4 * (n + 2) + 0; }
 
 constexpr long double
-operator"" W(long double n) // { dg-warning "shadowed by implementation" }
+operator"" W(long double n) // { dg-warning "1:floating point suffix .W. shadowed by implementation" }
 { return 4 * (n + 2) + 1; }
 
 constexpr long double
-operator"" q(long double n) // { dg-warning "shadowed by implementation" }
+operator"" q(long double n) // { dg-warning "1:floating point suffix .q. shadowed by implementation" }
 { return 4 * (n + 2) + 2; }
 
 constexpr long double
-operator"" Q(long double n) // { dg-warning "shadowed by implementation" }
+operator"" Q(long double n) // { dg-warning "1:floating point suffix .Q. shadowed by implementation" }
 { return 4 * (n + 2) + 3; }
 
 int
@@ -97,19 +97,19 @@  main()
   auto Qfp = 1.0Q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
 }
 
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 11 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 15 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 19 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 25 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 29 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 33 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 37 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 43 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 47 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 51 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 55 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 61 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 65 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 69 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 73 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 7 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 11 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 15 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 19 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 25 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 29 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 33 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 37 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 43 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 47 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 51 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 55 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 61 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 65 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 69 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 73 }
Index: testsuite/g++.dg/cpp0x/std_fext-numeric-literals.C
===================================================================
--- testsuite/g++.dg/cpp0x/std_fext-numeric-literals.C	(revision 261586)
+++ testsuite/g++.dg/cpp0x/std_fext-numeric-literals.C	(working copy)
@@ -4,73 +4,73 @@ 
 //  Integer imaginary...
 
 constexpr unsigned long long
-operator"" i(unsigned long long n) // { dg-warning "shadowed by implementation" "" { target c++11_only } }
+operator"" i(unsigned long long n) // { dg-warning "1:integer suffix .i. shadowed by implementation" "" { target c++11_only } }
 { return 4 * n + 0; }
 
 constexpr unsigned long long
-operator"" I(unsigned long long n) // { dg-warning "shadowed by implementation" }
+operator"" I(unsigned long long n) // { dg-warning "1:integer suffix .I. shadowed by implementation" }
 { return 4 * n + 1; }
 
 constexpr unsigned long long
-operator"" j(unsigned long long n) // { dg-warning "shadowed by implementation" }
+operator"" j(unsigned long long n) // { dg-warning "1:integer suffix .j. shadowed by implementation" }
 { return 4 * n + 2; }
 
 constexpr unsigned long long
-operator"" J(unsigned long long n) // { dg-warning "shadowed by implementation" }
+operator"" J(unsigned long long n) // { dg-warning "1:integer suffix .J. shadowed by implementation" }
 { return 4 * n + 3; }
 
 //  Floating-point imaginary...
 
 constexpr long double
-operator"" i(long double n) // { dg-warning "shadowed by implementation" "" { target c++11_only } }
+operator"" i(long double n) // { dg-warning "1:floating point suffix .i. shadowed by implementation" "" { target c++11_only } }
 { return 4.0L * n + 0.0L; }
 
 constexpr long double
-operator"" I(long double n) // { dg-warning "shadowed by implementation" }
+operator"" I(long double n) // { dg-warning "1:floating point suffix .I. shadowed by implementation" }
 { return 4.0L * n + 1.0L; }
 
 constexpr long double
-operator"" j(long double n) // { dg-warning "shadowed by implementation" }
+operator"" j(long double n) // { dg-warning "1:floating point suffix .j. shadowed by implementation" }
 { return 4.0L * n + 2.0L; }
 
 constexpr long double
-operator"" J(long double n) // { dg-warning "shadowed by implementation" }
+operator"" J(long double n) // { dg-warning "1:floating point suffix .J. shadowed by implementation" }
 { return 4.0L * n + 3.0L; }
 
 //  Fixed-point...
 
 constexpr long double
-operator"" k(long double n) // { dg-warning "shadowed by implementation" }
+operator"" k(long double n) // { dg-warning "1:floating point suffix .k. shadowed by implementation" }
 { return 4 * (n + 1) + 0; }
 
 constexpr long double
-operator"" K(long double n) // { dg-warning "shadowed by implementation" }
+operator"" K(long double n) // { dg-warning "1:floating point suffix .K. shadowed by implementation" }
 { return 4 * (n + 1) + 1; }
 
 constexpr long double
-operator"" r(long double n) // { dg-warning "shadowed by implementation" }
+operator"" r(long double n) // { dg-warning "1:floating point suffix .r. shadowed by implementation" }
 { return 4 * (n + 1) + 2; }
 
 constexpr long double
-operator"" R(long double n) // { dg-warning "shadowed by implementation" }
+operator"" R(long double n) // { dg-warning "1:floating point suffix .R. shadowed by implementation" }
 { return 4 * (n + 1) + 3; }
 
 //  Machine-defined...
 
 constexpr long double
-operator"" w(long double n) // { dg-warning "shadowed by implementation" }
+operator"" w(long double n) // { dg-warning "1:floating point suffix .w. shadowed by implementation" }
 { return 4 * (n + 2) + 0; }
 
 constexpr long double
-operator"" W(long double n) // { dg-warning "shadowed by implementation" }
+operator"" W(long double n) // { dg-warning "1:floating point suffix .W. shadowed by implementation" }
 { return 4 * (n + 2) + 1; }
 
 constexpr long double
-operator"" q(long double n) // { dg-warning "shadowed by implementation" }
+operator"" q(long double n) // { dg-warning "1:floating point suffix .q. shadowed by implementation" }
 { return 4 * (n + 2) + 2; }
 
 constexpr long double
-operator"" Q(long double n) // { dg-warning "shadowed by implementation" }
+operator"" Q(long double n) // { dg-warning "1:floating point suffix .Q. shadowed by implementation" }
 { return 4 * (n + 2) + 3; }
 
 int
@@ -97,19 +97,19 @@  main()
   auto Qfp = 1.0Q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
 }
 
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 11 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 15 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 19 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 25 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 29 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 33 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 37 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 43 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 47 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 51 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 55 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 61 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 65 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 69 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 73 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 7 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 11 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 15 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 19 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 25 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 29 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 33 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 37 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 43 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 47 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 51 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 55 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 61 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 65 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 69 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 73 }
Index: testsuite/g++.dg/cpp0x/std_fno-ext-numeric-literals.C
===================================================================
--- testsuite/g++.dg/cpp0x/std_fno-ext-numeric-literals.C	(revision 261586)
+++ testsuite/g++.dg/cpp0x/std_fno-ext-numeric-literals.C	(working copy)
@@ -97,19 +97,19 @@  main()
   auto Qfp = 1.0Q;
 }
 
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 11 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 15 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 19 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 25 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 29 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 33 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 37 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 43 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 47 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 51 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 55 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 61 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 65 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 69 }
-// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 73 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 7 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 11 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 15 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 19 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 25 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 29 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 33 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 37 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 43 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 47 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 51 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 55 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 61 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 65 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 69 }
+// { dg-warning "1:literal operator suffixes not preceded by" "" { target *-*-* } 73 }
Index: testsuite/g++.dg/cpp0x/udlit-args-neg.C
===================================================================
--- testsuite/g++.dg/cpp0x/udlit-args-neg.C	(revision 261586)
+++ testsuite/g++.dg/cpp0x/udlit-args-neg.C	(working copy)
@@ -5,37 +5,37 @@ 
 class Foo { };
 
 int
-operator"" _Foo();	// { dg-error "has invalid argument list" }
+operator"" _Foo();	// { dg-error "1:.int operator\"\"_Foo\\(\\). has invalid argument list" }
 
 Foo
-operator"" _Foo(int *);	// { dg-error "has invalid argument list" }
+operator"" _Foo(int *);	// { dg-error "1:.Foo operator\"\"_Foo\\(int\\*\\). has invalid argument list" }
 
 Foo
-operator"" _Foo(unsigned long int);	// { dg-error "has invalid argument list" }
+operator"" _Foo(unsigned long int);	// { dg-error "1:.Foo operator\"\"_Foo\\(long unsigned int\\). has invalid argument list" }
 
 Foo
-operator"" _Foo(double);	// { dg-error "has invalid argument list" }
+operator"" _Foo(double);	// { dg-error "1:.Foo operator\"\"_Foo\\(double\\). has invalid argument list" }
 
 Foo
-operator"" _Foo(const float *, std::size_t);	// { dg-error "has invalid argument list" }
+operator"" _Foo(const float *, std::size_t);	// { dg-error "1:.Foo operator\"\"_Foo\\(const float\\*, std::size_t\\). has invalid argument list" }
 
 Foo
-operator"" _Foo(const wchar_t *, int);	// { dg-error "has invalid argument list" }
+operator"" _Foo(const wchar_t *, int);	// { dg-error "1:.Foo operator\"\"_Foo\\(const wchar_t\\*, int\\). has invalid argument list" }
 
 Foo
-operator"" _Foo(const char16_t *);	// { dg-error "has invalid argument list" }
+operator"" _Foo(const char16_t *);	// { dg-error "1:.Foo operator\"\"_Foo\\(const char16_t\\*\\). has invalid argument list" }
 
 Foo
-operator"" _Foo(char...);	// { dg-error "has invalid argument list" }
+operator"" _Foo(char...);	// { dg-error "1:.Foo operator\"\"_Foo\\(char, \\.\\.\\.\\). has invalid argument list" }
 
 Foo
-operator"" _Foo(unsigned long long int, char);	// { dg-error "has invalid argument list" }
+operator"" _Foo(unsigned long long int, char);	// { dg-error "1:.Foo operator\"\"_Foo\\(long long unsigned int, char\\). has invalid argument list" }
 
 Foo
-operator"" _Foo(const char *, std::size_t, int);	// { dg-error "has invalid argument list" }
+operator"" _Foo(const char *, std::size_t, int);	// { dg-error "1:.Foo operator\"\"_Foo\\(const char\\*, std::size_t, int\\). has invalid argument list" }
 
 Foo
-operator"" _Foo(long double &);	// { dg-error "has invalid argument list" }
+operator"" _Foo(long double &);	// { dg-error "1:.Foo operator\"\"_Foo\\(long double&\\). has invalid argument list" }
 
 Foo
-operator"" _Foo(std::size_t, const char16_t *);	// { dg-error "has invalid argument list" }
+operator"" _Foo(std::size_t, const char16_t *);	// { dg-error "1:.Foo operator\"\"_Foo\\(std::size_t, const char16_t\\*\\). has invalid argument list" }
Index: testsuite/g++.dg/cpp0x/udlit-clink-neg.C
===================================================================
--- testsuite/g++.dg/cpp0x/udlit-clink-neg.C	(revision 261586)
+++ testsuite/g++.dg/cpp0x/udlit-clink-neg.C	(working copy)
@@ -3,6 +3,6 @@ 
 extern "C" {
 
 int
-operator"" _badclinkage(unsigned long long);	// { dg-error "operator with C linkage" }
+operator"" _badclinkage(unsigned long long);	// { dg-error "1:literal operator with C linkage" }
 
 }
Index: testsuite/g++.dg/cpp0x/udlit-extern-c.C
===================================================================
--- testsuite/g++.dg/cpp0x/udlit-extern-c.C	(revision 261586)
+++ testsuite/g++.dg/cpp0x/udlit-extern-c.C	(working copy)
@@ -2,6 +2,6 @@ 
 
 extern "C" { // { dg-message "1: 'extern .C.' linkage started here" }
 
-constexpr double operator"" _deg ( double degrees ); // { dg-error "literal operator with C linkage" }
+constexpr double operator"" _deg ( double degrees ); // { dg-error "18:literal operator with C linkage" }
 
 }
Index: testsuite/g++.dg/cpp0x/udlit-member-neg.C
===================================================================
--- testsuite/g++.dg/cpp0x/udlit-member-neg.C	(revision 261586)
+++ testsuite/g++.dg/cpp0x/udlit-member-neg.C	(working copy)
@@ -4,7 +4,7 @@  class Foo
 {
 public:
   Foo() { }
-  int operator"" _Bar(char32_t);  // { dg-error "must be a non-member function" }
+  int operator"" _Bar(char32_t);  // { dg-error "7:.int Foo::operator\"\"_Bar\\(char32_t\\). must be a non-member function" }
 };
 
 int i = operator"" _Bar(U'x');  // { dg-error "9:'operator\"\"_Bar' was not declared in this scope" }
Index: testsuite/g++.dg/other/static3.C
===================================================================
--- testsuite/g++.dg/other/static3.C	(nonexistent)
+++ testsuite/g++.dg/other/static3.C	(working copy)
@@ -0,0 +1,7 @@ 
+void foo()
+{
+  struct S
+  {
+    static const int a = 0;  // { dg-error "22:local class" }
+  };
+}
Index: testsuite/g++.dg/other/static4.C
===================================================================
--- testsuite/g++.dg/other/static4.C	(nonexistent)
+++ testsuite/g++.dg/other/static4.C	(working copy)
@@ -0,0 +1,6 @@ 
+// { dg-options -Wno-pedantic }
+
+void foo()
+{
+  static void bar();  // { dg-error "3:cannot declare static function" }
+}
Index: testsuite/g++.dg/warn/Wshadow-15.C
===================================================================
--- testsuite/g++.dg/warn/Wshadow-15.C	(nonexistent)
+++ testsuite/g++.dg/warn/Wshadow-15.C	(working copy)
@@ -0,0 +1,7 @@ 
+// { dg-options "-Wshadow" }
+
+template<typename T>
+void* operator new(__SIZE_TYPE__, T&);  // { dg-warning "7:shadowing library function" }
+
+template<typename T>
+void operator delete(void *, T&);  // { dg-warning "6:shadowing library function" }