===================================================================
@@ -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;
}
===================================================================
@@ -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);
===================================================================
@@ -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 }
===================================================================
@@ -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 }
===================================================================
@@ -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 }
===================================================================
@@ -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" }
===================================================================
@@ -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" }
}
===================================================================
@@ -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" }
}
===================================================================
@@ -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" }
===================================================================
@@ -0,0 +1,7 @@
+void foo()
+{
+ struct S
+ {
+ static const int a = 0; // { dg-error "22:local class" }
+ };
+}
===================================================================
@@ -0,0 +1,6 @@
+// { dg-options -Wno-pedantic }
+
+void foo()
+{
+ static void bar(); // { dg-error "3:cannot declare static function" }
+}
===================================================================
@@ -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" }