This test modifies dg-message, dg-warning, and dg-error test directives for several G++ tests by adding comments that will be added to lines in the test summary to eliminate non-unique lines for checks of messages for the same line of source code in a test.
Tested on i686-pc-linux-gnu and arm-none-eabi, checked in. Janis
2012-06-15 Janis Johnson <jano...@codesourcery.com> * g++.dg/cpp0x/auto27.C: Add comments to checks for multiple messages reported for one line of source code. * g++.dg/cpp0x/constexpr-decl.C: Likewise. * g++.dg/cpp0x/decltype2.C: Likewise. * g++.dg/cpp0x/decltype3.C: Likewise. * g++.dg/cpp0x/lambda/lambda-syntax1.C: Likewise. * g++.dg/cpp0x/regress/error-recovery1.C: Likewise. * g++.dg/cpp0x/static_assert3.C: Likewise. * g++.dg/cpp0x/udlit-cpp98-neg.C: Likewise. * g++.dg/cpp0x/udlit-shadow-neg.C: Likewise. * g++.dg/cpp0x/union1.C: Likewise. * g++.dg/cpp0x/variadic-ex10.C: Likewise. * g++.dg/cpp0x/variadic-ex14.C: Likewise. * g++.dg/cpp0x/variadic2.C: Likewise. * g++.dg/cpp0x/variadic20.C: Likewise. * g++.dg/cpp0x/variadic74.C: Likewise. * g++.dg/diagnostic/bitfld2.C: Likewise. * g++.dg/ext/attrib44.C: Likewise. * g++.dg/ext/no-asm-1.C: Likewise. * g++.dg/other/error34.C: Likewise. * g++.dg/parse/crash46.C: Likewise. * g++.dg/parse/error10.C: Likewise. * g++.dg/parse/error2.C: Likewise. * g++.dg/parse/error3.C: Likewise. * g++.dg/parse/error36.C: Likewise. * g++.dg/parse/error8.C: Likewise. * g++.dg/parse/error9.C: Likewise. * g++.dg/parse/parser-pr28152-2.C: Likewise. * g++.dg/parse/parser-pr28152.C: Likewise. * g++.dg/parse/template25.C: Likewise. * g++.dg/parse/typename11.C: Likewise. * g++.dg/tc1/dr147.C: Likewise. * g++.dg/template/deduce3.C: Likewise. * g++.dg/template/koenig9.C: Likewise. * g++.dg/template/pr23510.C: Likewise. * g++.dg/warn/pr12242.C: Likewise. * g++.dg/warn/pr30551-2.C: Likewise. * g++.dg/warn/pr30551.C: Likewise. * g++.old-deja/g++.other/typename1.C: Likewise. * g++.old-deja/g++.pt/niklas01a.C: Likewise. Index: g++.dg/cpp0x/auto27.C =================================================================== --- g++.dg/cpp0x/auto27.C (revision 188540) +++ g++.dg/cpp0x/auto27.C (working copy) @@ -1,6 +1,6 @@ // PR c++/51186 -auto main()->int // { dg-error "std=" "" { target c++98 } } - // { dg-error "auto" "" { target c++98 } 3 } - // { dg-error "no type" "" { target c++98 } 3 } +auto main()->int // { dg-error "std=" "std" { target c++98 } } + // { dg-error "auto" "auto" { target c++98 } 3 } + // { dg-error "no type" "no type" { target c++98 } 3 } { } Index: g++.dg/cpp0x/constexpr-decl.C =================================================================== --- g++.dg/cpp0x/constexpr-decl.C (revision 188540) +++ g++.dg/cpp0x/constexpr-decl.C (working copy) @@ -2,8 +2,8 @@ // { dg-options -std=c++0x } struct S { - static constexpr int size; // { dg-error "must have an initializer" } - // { dg-error "previous declaration" "" { target *-*-* } 5 } + static constexpr int size; // { dg-error "must have an initializer" "must have" } + // { dg-error "previous declaration" "previous" { target *-*-* } 5 } }; const int limit = 2 * S::size; Index: g++.dg/cpp0x/decltype2.C =================================================================== --- g++.dg/cpp0x/decltype2.C (revision 188540) +++ g++.dg/cpp0x/decltype2.C (working copy) @@ -45,8 +45,8 @@ int bar(int); CHECK_DECLTYPE(decltype(foo), int(char)); -decltype(bar) z; // { dg-error "overload" } -// { dg-error "invalid type" "" { target *-*-* } 48 } +decltype(bar) z; // { dg-error "overload" "overload" } +// { dg-error "invalid type" "invalid" { target *-*-* } 48 } CHECK_DECLTYPE(decltype(&foo), int(*)(char)); CHECK_DECLTYPE(decltype(*&foo), int(&)(char)); Index: g++.dg/cpp0x/decltype3.C =================================================================== --- g++.dg/cpp0x/decltype3.C (revision 188540) +++ g++.dg/cpp0x/decltype3.C (working copy) @@ -55,8 +55,8 @@ }; CHECK_DECLTYPE(decltype(aa.*&A::a), int&); -decltype(aa.*&A::b) zz; // { dg-error "cannot create pointer to reference member" } -// { dg-error "invalid type" "" { target *-*-* } 58 } +decltype(aa.*&A::b) zz; // { dg-error "cannot create pointer to reference member" "cannot" } +// { dg-error "invalid type" "invalid type" { target *-*-* } 58 } CHECK_DECLTYPE(decltype(caa.*&A::a), const int&); class X { Index: g++.dg/cpp0x/lambda/lambda-syntax1.C =================================================================== --- g++.dg/cpp0x/lambda/lambda-syntax1.C (revision 188540) +++ g++.dg/cpp0x/lambda/lambda-syntax1.C (working copy) @@ -1,5 +1,5 @@ // PR c++/46124 // { dg-options -std=c++0x } -void foo() { [] () -> void (); } // { dg-error "returning a function" } -// { dg-error "expected .\{" "" { target *-*-* } 4 } +void foo() { [] () -> void (); } // { dg-error "returning a function" "returning" } +// { dg-error "expected .\{" "expected" { target *-*-* } 4 } Index: g++.dg/cpp0x/regress/error-recovery1.C =================================================================== --- g++.dg/cpp0x/regress/error-recovery1.C (revision 188540) +++ g++.dg/cpp0x/regress/error-recovery1.C (working copy) @@ -5,7 +5,7 @@ foo () { const bool b =; // { dg-error "" } - foo < b > (); // { dg-error "constant expression" } + foo < b > (); // { dg-error "constant expression" "const expr" } }; -// { dg-error "no match" "" { target *-*-* } 8 } +// { dg-error "no match" "no match" { target *-*-* } 8 } Index: g++.dg/cpp0x/static_assert3.C =================================================================== --- g++.dg/cpp0x/static_assert3.C (revision 188540) +++ g++.dg/cpp0x/static_assert3.C (working copy) @@ -1,4 +1,4 @@ // { dg-options "-std=c++0x" } -static_assert(7 / 0, "X"); // { dg-error "non-constant condition" } -// { dg-warning "division by zero" "" { target *-*-* } 2 } -// { dg-error "7 / 0.. is not a constant expression" "" { target *-*-* } 2 } +static_assert(7 / 0, "X"); // { dg-error "non-constant condition" "non-constant" } +// { dg-warning "division by zero" "zero" { target *-*-* } 2 } +// { dg-error "7 / 0.. is not a constant expression" "not a constant" { target *-*-* } 2 } Index: g++.dg/cpp0x/udlit-cpp98-neg.C =================================================================== --- g++.dg/cpp0x/udlit-cpp98-neg.C (revision 188540) +++ g++.dg/cpp0x/udlit-cpp98-neg.C (working copy) @@ -12,6 +12,6 @@ operator"" _Q(const char *, std::size_t) // { dg-warning "user-defined literals only available with" } { return 42; } -int x = "Hello"_Q; // { dg-error "invalid conversion from" } +int x = "Hello"_Q; // { dg-error "invalid conversion from" "invalid" } -// { dg-error "expected" "" { target *-*-* } 15 } +// { dg-error "expected" "expected" { target *-*-* } 15 } Index: g++.dg/cpp0x/udlit-shadow-neg.C =================================================================== --- g++.dg/cpp0x/udlit-shadow-neg.C (revision 188540) +++ g++.dg/cpp0x/udlit-shadow-neg.C (working copy) @@ -39,11 +39,11 @@ } -// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "" { target *-*-* } 5 } -// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "" { target *-*-* } 9 } -// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "" { target *-*-* } 13 } -// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "" { target *-*-* } 17 } -// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "" { target *-*-* } 25 } -// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "" { target *-*-* } 29 } -// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "" { target *-*-* } 33 } -// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "" { target *-*-* } 37 } +// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "reserved" { target *-*-* } 5 } +// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "reserved" { target *-*-* } 9 } +// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "reserved" { target *-*-* } 13 } +// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "reserved" { target *-*-* } 17 } +// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "reserved" { target *-*-* } 25 } +// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "reserved" { target *-*-* } 29 } +// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "reserved" { target *-*-* } 33 } +// { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" "reserved" { target *-*-* } 37 } Index: g++.dg/cpp0x/union1.C =================================================================== --- g++.dg/cpp0x/union1.C (revision 188540) +++ g++.dg/cpp0x/union1.C (working copy) @@ -14,8 +14,8 @@ A a; // { dg-error "union member" } }; -B b; // { dg-error "B::B\\(\\)" } -B b2(b); // { dg-error "B::B\\(const B&\\)" } +B b; // { dg-error "B::B\\(\\)" "B::B" } +B b2(b); // { dg-error "B::B\\(const B&\\)" "B::B" } struct C { @@ -25,10 +25,10 @@ }; }; -C c; // { dg-error "C::C\\(\\)" } -C c2(c); // { dg-error "C::C\\(const C&\\)" } +C c; // { dg-error "C::C\\(\\)" "C::C" } +C c2(c); // { dg-error "C::C\\(const C&\\)" "C::C" } -// { dg-error "B::~B" "" { target *-*-* } 17 } -// { dg-error "B::~B" "" { target *-*-* } 18 } -// { dg-error "C::~C" "" { target *-*-* } 28 } -// { dg-error "C::~C" "" { target *-*-* } 29 } +// { dg-error "B::~B" "B::~B" { target *-*-* } 17 } +// { dg-error "B::~B" "B::~B" { target *-*-* } 18 } +// { dg-error "C::~C" "C::~C" { target *-*-* } 28 } +// { dg-error "C::~C" "C::~C" { target *-*-* } 29 } Index: g++.dg/cpp0x/variadic-ex10.C =================================================================== --- g++.dg/cpp0x/variadic-ex10.C (revision 188540) +++ g++.dg/cpp0x/variadic-ex10.C (working copy) @@ -4,6 +4,6 @@ Tuple<> t0; // Types contains no arguments Tuple<int> t1; // Types contains one argument: int Tuple<int, float> t2; // Types contains two arguments: int and float -Tuple<0> error; // { dg-error "mismatch" } -// { dg-error "expected a type" "" { target *-*-* } 7 } -// { dg-error "in declaration" "" { target *-*-* } 7 } +Tuple<0> error; // { dg-error "mismatch" "mismatch" } +// { dg-error "expected a type" "expected a type" { target *-*-* } 7 } +// { dg-error "in declaration" "in declaration" { target *-*-* } 7 } Index: g++.dg/cpp0x/variadic-ex14.C =================================================================== --- g++.dg/cpp0x/variadic-ex14.C (revision 188540) +++ g++.dg/cpp0x/variadic-ex14.C (working copy) @@ -8,12 +8,12 @@ template<template<class...> class Q> class Y { /* ... */ }; X<A> xA; // okay -X<B> xB; // { dg-error "mismatch" } -// { dg-error "expected a template" "" { target *-*-* } 11 } -// { dg-error "invalid type" "" { target *-*-* } 11 } -X<C> xC; // { dg-error "mismatch" } -// { dg-error "expected a template" "" { target *-*-* } 14 } -// { dg-error "invalid type" "" { target *-*-* } 14 } +X<B> xB; // { dg-error "mismatch" "mismatch" } +// { dg-error "expected a template" "expected" { target *-*-* } 11 } +// { dg-error "invalid type" "invalid" { target *-*-* } 11 } +X<C> xC; // { dg-error "mismatch" "mismatch" } +// { dg-error "expected a template" "expected" { target *-*-* } 14 } +// { dg-error "invalid type" "invalid" { target *-*-* } 14 } Y<A> yA; Y<B> yB; Y<C> yC; // okay Index: g++.dg/cpp0x/variadic2.C =================================================================== --- g++.dg/cpp0x/variadic2.C (revision 188540) +++ g++.dg/cpp0x/variadic2.C (working copy) @@ -8,8 +8,8 @@ template<typename T1, typename T2, typename... Rest> struct two_or_more {}; // { dg-error "provided for" } -typedef two_or_more<int> bad; // { dg-error "2 or more" } -// { dg-error "invalid type" "" { target *-*-* } 11 } +typedef two_or_more<int> bad; // { dg-error "2 or more" "2 or more" } +// { dg-error "invalid type" "invalid type" { target *-*-* } 11 } void f() { Index: g++.dg/cpp0x/variadic20.C =================================================================== --- g++.dg/cpp0x/variadic20.C (revision 188540) +++ g++.dg/cpp0x/variadic20.C (working copy) @@ -37,11 +37,11 @@ int a0[metatuple<>::value == 0? 1 : -1]; int a1[metatuple<add_pointer>::value == 1? 1 : -1]; -int a2a[metatuple<add_pointer, add_pointer>::value == 2? 1 : -1]; // { dg-error "ambiguous|array bound" } +int a2a[metatuple<add_pointer, add_pointer>::value == 2? 1 : -1]; // { dg-error "ambiguous|array bound" "bound" } int a2b[metatuple<add_reference, add_reference>::value == 2? 1 : -1]; -int a3[metatuple<add_pointer, add_reference>::value == 3? 1 : -1]; // { dg-error "ambiguous|array bound" } +int a3[metatuple<add_pointer, add_reference>::value == 3? 1 : -1]; // { dg-error "ambiguous|array bound" "bound" } int a4[metatuple<add_reference>::value == 4? 1 : -1]; int a5[metatuple<add_reference, add_pointer>::value == 5? 1 : -1]; -// { dg-error "incomplete" "" { target *-*-* } 40 } -// { dg-error "incomplete" "" { target *-*-* } 42 } +// { dg-error "incomplete" "incomplete" { target *-*-* } 40 } +// { dg-error "incomplete" "incomplete" { target *-*-* } 42 } Index: g++.dg/cpp0x/variadic74.C =================================================================== --- g++.dg/cpp0x/variadic74.C (revision 188540) +++ g++.dg/cpp0x/variadic74.C (working copy) @@ -19,8 +19,8 @@ A<int*, float*>::X<&i, &f> apple1; B<int, float>::X<&i, &f> banana1; -A<int*, float*>::X<&i> apple2; // { dg-error "wrong number of template arguments" } -// { dg-error "invalid type" "" { target *-*-* } 22 } -A<int*, float*>::X<&i, &f, &f> apple3; // { dg-error "wrong number of template arguments" } -// { dg-error "invalid type" "" { target *-*-* } 24 } +A<int*, float*>::X<&i> apple2; // { dg-error "wrong number of template arguments" "wrong number" } +// { dg-error "invalid type" "invalid" { target *-*-* } 22 } +A<int*, float*>::X<&i, &f, &f> apple3; // { dg-error "wrong number of template arguments" "wrong number" } +// { dg-error "invalid type" "invalid" { target *-*-* } 24 } A<int, float> apple4; Index: g++.dg/diagnostic/bitfld2.C =================================================================== --- g++.dg/diagnostic/bitfld2.C (revision 188540) +++ g++.dg/diagnostic/bitfld2.C (working copy) @@ -3,7 +3,7 @@ template<int> struct A { - struct {} : 2; // { dg-error "expected ';' after struct" } + struct {} : 2; // { dg-error "expected ';' after struct" "expected" } }; -// { dg-error "ISO C.. forbids declaration" "" { target *-*-* } 6 } -// { dg-error "ISO C.. prohibits anonymous" "" { target *-*-* } 6 } +// { dg-error "ISO C.. forbids declaration" "declaration" { target *-*-* } 6 } +// { dg-error "ISO C.. prohibits anonymous" "anonymous" { target *-*-* } 6 } Index: g++.dg/ext/attrib44.C =================================================================== --- g++.dg/ext/attrib44.C (revision 188540) +++ g++.dg/ext/attrib44.C (working copy) @@ -1,4 +1,4 @@ // PR c++/52671 // { dg-do compile } -__attribute__ ((deprecated)) enum E { E0 }; // { dg-warning "attribute ignored in declaration of" } -// { dg-message "must follow the" "" { target *-*-* } 3 } +__attribute__ ((deprecated)) enum E { E0 }; // { dg-warning "attribute ignored in declaration of" "ignored" } +// { dg-message "must follow the" "must follow" { target *-*-* } 3 } Index: g++.dg/ext/no-asm-1.C =================================================================== --- g++.dg/ext/no-asm-1.C (revision 188540) +++ g++.dg/ext/no-asm-1.C (working copy) @@ -5,6 +5,6 @@ // keywords. int asm; // { dg-error "before .asm." } -int typeof; // { dg-error "expected" } -// { dg-error "multiple types" "" { target *-*-* } 8 } -// { dg-error "declaration" "" { target *-*-* } 8 } +int typeof; // { dg-error "expected" "expected" } +// { dg-error "multiple types" "multiple" { target *-*-* } 8 } +// { dg-error "declaration" "declaration" { target *-*-* } 8 } Index: g++.dg/other/error34.C =================================================================== --- g++.dg/other/error34.C (revision 188540) +++ g++.dg/other/error34.C (working copy) @@ -2,5 +2,5 @@ // { dg-do compile } // { dg-options "" } -S () : str(__PRETTY_FUNCTION__) {} // { dg-error "forbids declaration" } -// { dg-error "only constructors" "" { target *-*-* } 5 } +S () : str(__PRETTY_FUNCTION__) {} // { dg-error "forbids declaration" "decl" } +// { dg-error "only constructors" "constructor" { target *-*-* } 5 } Index: g++.dg/parse/crash46.C =================================================================== --- g++.dg/parse/crash46.C (revision 188540) +++ g++.dg/parse/crash46.C (working copy) @@ -2,17 +2,17 @@ // { dg-do compile } void -foo (_Decimal32) // { dg-error "declared void" } +foo (_Decimal32) // { dg-error "declared void" "declared" } { } - // { dg-error "was not declared" "" { target *-*-* } 5 } + // { dg-error "was not declared" "not" { target *-*-* } 5 } void -bar (_Bool) // { dg-error "declared void" } +bar (_Bool) // { dg-error "declared void" "declared" } { } - // { dg-error "was not declared" "" { target *-*-* } 10 } + // { dg-error "was not declared" "not" { target *-*-* } 10 } void -baz (_Fract) // { dg-error "declared void" } +baz (_Fract) // { dg-error "declared void" "declared" } { } - // { dg-error "was not declared" "" { target *-*-* } 15 } + // { dg-error "was not declared" "not" { target *-*-* } 15 } Index: g++.dg/parse/error10.C =================================================================== --- g++.dg/parse/error10.C (revision 188540) +++ g++.dg/parse/error10.C (working copy) @@ -15,5 +15,5 @@ } // Here, columns nums are not very accurate either. Still acceptable though -// { dg-error "30:invalid type in declaration before ';' token" "" { target *-*-* } 14 } -// { dg-error "30:two or more data types in declaration of 'e4'" "" { target *-*-* } 14 } +// { dg-error "30:invalid type in declaration before ';' token" "invalid" { target *-*-* } 14 } +// { dg-error "30:two or more data types in declaration of 'e4'" "2 or more" { target *-*-* } 14 } Index: g++.dg/parse/error2.C =================================================================== --- g++.dg/parse/error2.C (revision 188540) +++ g++.dg/parse/error2.C (working copy) @@ -8,8 +8,8 @@ template <int> struct Foo {}; -Foo<func(g)> f; // { dg-error "5:'int func.double.' cannot appear in a constant-expression" "" { target *-*-* } 11 } -// { dg-error "10:'g' cannot appear in a constant-expression" "" { target *-*-* } 11 } -// { dg-error "11:a function call cannot appear in a constant-expression" "" { target *-*-* } 11 } -// { dg-error "12:template argument 1 is invalid" "" { target *-*-* } 11 } -// { dg-error "15:invalid type in declaration before ';' token" "" { target *-*-* } 11 } +Foo<func(g)> f; // { dg-error "5:'int func.double.' cannot appear in a constant-expression" "func double" { target *-*-* } 11 } +// { dg-error "10:'g' cannot appear in a constant-expression" "g" { target *-*-* } 11 } +// { dg-error "11:a function call cannot appear in a constant-expression" "call" { target *-*-* } 11 } +// { dg-error "12:template argument 1 is invalid" "invalid template argument" { target *-*-* } 11 } +// { dg-error "15:invalid type in declaration before ';' token" "invalid type" { target *-*-* } 11 } Index: g++.dg/parse/error3.C =================================================================== --- g++.dg/parse/error3.C (revision 188540) +++ g++.dg/parse/error3.C (working copy) @@ -5,5 +5,5 @@ void(*AddFunction)(const TYPE&,bool&, char*, char*, unsigned*)); -// { dg-error "64: ISO C\\+\\+ forbids declaration of 'parameter' with no type" "" { target *-*-* } { 5 } } -// { dg-error "60: 'TYPE' does not name a type" "" { target *-*-* } { 5 } } +// { dg-error "64: ISO C\\+\\+ forbids declaration of 'parameter' with no type" "forbids" { target *-*-* } { 5 } } +// { dg-error "60: 'TYPE' does not name a type" "does not" { target *-*-* } { 5 } } Index: g++.dg/parse/error36.C =================================================================== --- g++.dg/parse/error36.C (revision 188540) +++ g++.dg/parse/error36.C (working copy) @@ -11,22 +11,22 @@ void f(T t) { typedef A<T>::foo type; // { dg-error "typename" } - A<T>::bar b; // { dg-error "typename" } -} // { dg-error "expected ';'" "" { target *-*-* } 14 } + A<T>::bar b; // { dg-error "typename" "typename" } +} // { dg-error "expected ';'" "expected" { target *-*-* } 14 } // PR c++/36353 template <class T> struct B { void f() { - A<T>::baz z; // { dg-error "typename" } - } // { dg-error "expected ';'" "" { target *-*-* } 22 } + A<T>::baz z; // { dg-error "typename" "typename" } + } // { dg-error "expected ';'" "expected" { target *-*-* } 22 } }; // PR c++/40738 template <class T> -void g(const A<T>::type &t); // { dg-error "typename" } -// { dg-error "no type" "" { target *-*-* } 28 } +void g(const A<T>::type &t); // { dg-error "typename" "typename" } +// { dg-error "no type" "no type" { target *-*-* } 28 } // PR c++/18451 template <class T> A<T>::B A<T>::b; // { dg-error "typename" } Index: g++.dg/parse/error8.C =================================================================== --- g++.dg/parse/error8.C (revision 188540) +++ g++.dg/parse/error8.C (working copy) @@ -4,6 +4,6 @@ struct A { friend typename struct B; }; -// { dg-error "28:expected nested-name-specifier before 'struct'" "" { target *-*-* } 4 } -// { dg-error "35:multiple types in one declaration" "" { target *-*-* } 4 } -// { dg-error "12:friend declaration does not name a class or function" "" { target *-*-* } 4 } +// { dg-error "28:expected nested-name-specifier before 'struct'" "expected" { target *-*-* } 4 } +// { dg-error "35:multiple types in one declaration" "multiple" { target *-*-* } 4 } +// { dg-error "12:friend declaration does not name a class or function" "friend decl" { target *-*-* } 4 } Index: g++.dg/parse/error9.C =================================================================== --- g++.dg/parse/error9.C (revision 188540) +++ g++.dg/parse/error9.C (working copy) @@ -5,5 +5,5 @@ int a[] = { FOO: 1, BAR: 2 }; // the following 2 column locations are still not accurate enough -// { dg-error "28:name 'FOO' used in a GNU-style designated initializer for an array" "" { target *-*-* } 5 } -// { dg-error "28:name 'BAR' used in a GNU-style designated initializer for an array" "" { target *-*-* } 5 } +// { dg-error "28:name 'FOO' used in a GNU-style designated initializer for an array" "FOO" { target *-*-* } 5 } +// { dg-error "28:name 'BAR' used in a GNU-style designated initializer for an array" "BAR" { target *-*-* } 5 } Index: g++.dg/parse/parser-pr28152-2.C =================================================================== --- g++.dg/parse/parser-pr28152-2.C (revision 188540) +++ g++.dg/parse/parser-pr28152-2.C (working copy) @@ -6,8 +6,8 @@ { __complex__ float z; - z = __complex__ (1.90000007326203904e+19, 0.0); // { dg-error "expected primary-expression before '__complex__'" } - // { dg-error "expected .;. before .__complex__." "" { target *-*-* } 9 } - z = __complex__ (1.0e+0, 0.0) / z; // { dg-error "expected primary-expression before '__complex__'" } - // { dg-error "expected .;. before '__complex__'" "" { target *-*-* } 11 } - // { dg-error "at end of input" "" { target *-*-* } 11 } + z = __complex__ (1.90000007326203904e+19, 0.0); // { dg-error "expected primary-expression before '__complex__'" "primary-expression" } + // { dg-error "expected .;. before .__complex__." "semicolon" { target *-*-* } 9 } + z = __complex__ (1.0e+0, 0.0) / z; // { dg-error "expected primary-expression before '__complex__'" "primaty-expression" } + // { dg-error "expected .;. before '__complex__'" "semicolon" { target *-*-* } 11 } + // { dg-error "at end of input" "end" { target *-*-* } 11 } Index: g++.dg/parse/parser-pr28152.C =================================================================== --- g++.dg/parse/parser-pr28152.C (revision 188540) +++ g++.dg/parse/parser-pr28152.C (working copy) @@ -6,8 +6,8 @@ { _Complex float z; - z = _Complex (1.90000007326203904e+19, 0.0); // { dg-error "expected primary-expression before '_Complex'" } - // { dg-error "expected .;. before ._Complex." "" { target *-*-* } 9 } - z = _Complex (1.0e+0, 0.0) / z; // { dg-error "expected primary-expression before '_Complex'" } - // { dg-error "expected .;. before '_Complex'" "" { target *-*-* } 11 } - // { dg-error "at end of input" "" { target *-*-* } 11 } + z = _Complex (1.90000007326203904e+19, 0.0); // { dg-error "expected primary-expression before '_Complex'" "primary-expression" } + // { dg-error "expected .;. before ._Complex." "semicolon" { target *-*-* } 9 } + z = _Complex (1.0e+0, 0.0) / z; // { dg-error "expected primary-expression before '_Complex'" "primary-expression" } + // { dg-error "expected .;. before '_Complex'" "semicolon" { target *-*-* } 11 } + // { dg-error "at end of input" "end" { target *-*-* } 11 } Index: g++.dg/parse/template25.C =================================================================== --- g++.dg/parse/template25.C (revision 188540) +++ g++.dg/parse/template25.C (working copy) @@ -9,6 +9,6 @@ void g(void) { - template f<int>(); /* { dg-error "expected primary-expression" } */ - /* { dg-error "expected ';'" "" { target *-*-* } 12 } */ + template f<int>(); /* { dg-error "expected primary-expression" "primary-expression" } */ + /* { dg-error "expected ';'" "semicolon" { target *-*-* } 12 } */ } Index: g++.dg/parse/typename11.C =================================================================== --- g++.dg/parse/typename11.C (revision 188540) +++ g++.dg/parse/typename11.C (working copy) @@ -10,7 +10,7 @@ // note: I is nested type in X, not Y! template <int dim> -Y<dim>::I::I () {} // { dg-error "dependent typedef" } -// { dg-error "no type|dependent type" "" { target *-*-* } 13 } +Y<dim>::I::I () {} // { dg-error "dependent typedef" "typedef" } +// { dg-error "no type|dependent type" "no type" { target *-*-* } 13 } template struct Y<1>; Index: g++.dg/tc1/dr147.C =================================================================== --- g++.dg/tc1/dr147.C (revision 188540) +++ g++.dg/tc1/dr147.C (working copy) @@ -20,8 +20,8 @@ void f() { - A::A a; // { dg-error "constructor" } -} // { dg-error "" "" { target *-*-* } 23 } error cascade + A::A a; // { dg-error "constructor" "constructor" } +} // { dg-error "" "error cascade" { target *-*-* } 23 } error cascade } namespace N2 { Index: g++.dg/template/deduce3.C =================================================================== --- g++.dg/template/deduce3.C (revision 188540) +++ g++.dg/template/deduce3.C (working copy) @@ -1,11 +1,11 @@ template <typename T> -void f(int, T (*)() = 0); // { dg-message "note" } +void f(int, T (*)() = 0); // { dg-message "note" "note" } void g() { typedef int A[2]; f<A>(0); // { dg-error "" } - // { dg-error "returning an array" "candidate explanation" { target *-*-* } 2 } + // { dg-error "returning an array" "returning an array" { target *-*-* } 2 } typedef void F(); f<F>(0); // { dg-error "" } - // { dg-error "returning a function" "candidate explanation" { target *-*-* } 2 } + // { dg-error "returning a function" "returning a function" { target *-*-* } 2 } } Index: g++.dg/template/koenig9.C =================================================================== --- g++.dg/template/koenig9.C (revision 188540) +++ g++.dg/template/koenig9.C (working copy) @@ -16,8 +16,8 @@ template <class T> struct B: A<T> { - void f() { h(T()); } // { dg-error "argument-dependent" } - static void g() { h(T()); } // { dg-error "argument-dependent" } + void f() { h(T()); } // { dg-error "argument-dependent" "arg-dep" } + static void g() { h(T()); } // { dg-error "argument-dependent" "arg-dep" } }; int main() @@ -27,7 +27,7 @@ b.g(); } -// { dg-message "dependent base .A.int" "" { target *-*-* } 19 } -// { dg-message "this->h" "" { target *-*-* } 19 } -// { dg-message "dependent base .A.int" "" { target *-*-* } 20 } -// { dg-message "B::h" "" { target *-*-* } 20 } +// { dg-message "dependent base .A.int" "base" { target *-*-* } 19 } +// { dg-message "this->h" "this->h" { target *-*-* } 19 } +// { dg-message "dependent base .A.int" "base" { target *-*-* } 20 } +// { dg-message "B::h" "B::h" { target *-*-* } 20 } Index: g++.dg/template/pr23510.C =================================================================== --- g++.dg/template/pr23510.C (revision 188540) +++ g++.dg/template/pr23510.C (working copy) @@ -3,9 +3,9 @@ template<unsigned int nFactor> struct Factorial { - enum { nValue = nFactor * Factorial<nFactor - 1>::nValue }; // { dg-error "depth exceeds maximum" } - // { dg-message "recursively required" "" { target *-*-* } 6 } - // { dg-error "incomplete type" "" { target *-*-* } 6 } + enum { nValue = nFactor * Factorial<nFactor - 1>::nValue }; // { dg-error "depth exceeds maximum" "exceeds" } + // { dg-message "recursively required" "recurse" { target *-*-* } 6 } + // { dg-error "incomplete type" "incomplete" { target *-*-* } 6 } } // { dg-error "expected ';' after" } template<> Index: g++.dg/warn/pr12242.C =================================================================== --- g++.dg/warn/pr12242.C (revision 188540) +++ g++.dg/warn/pr12242.C (working copy) @@ -10,8 +10,8 @@ X x; Y y; - x = 10; // { dg-warning "invalid conversion from .int. to .X." } - // { dg-warning "unspecified" "" { target *-*-* } 13 } + x = 10; // { dg-warning "invalid conversion from .int. to .X." "invalid" } + // { dg-warning "unspecified" "unspecified" { target *-*-* } 13 } x = 1; // { dg-warning "invalid conversion from .int. to .X." } x = C; // { dg-error "cannot convert .Y. to .X. in assignment" } x = D; // { dg-error "cannot convert .Y. to .X. in assignment" } Index: g++.dg/warn/pr30551-2.C =================================================================== --- g++.dg/warn/pr30551-2.C (revision 188540) +++ g++.dg/warn/pr30551-2.C (working copy) @@ -2,5 +2,5 @@ // { dg-do compile } // { dg-options "-pedantic-errors" } // { dg-skip-if "-Wmain not enabled with -pedantic on SPU" { spu-*-* } } -int main(char a) {} /* { dg-error "first argument of .*main.* should be .int." } */ -/* { dg-error "main.* takes only zero or two arguments" "" { target *-*-* } 5 } */ +int main(char a) {} /* { dg-error "first argument of .*main.* should be .int." "int" } */ +/* { dg-error "main.* takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */ Index: g++.dg/warn/pr30551.C =================================================================== --- g++.dg/warn/pr30551.C (revision 188540) +++ g++.dg/warn/pr30551.C (working copy) @@ -2,5 +2,5 @@ // { dg-do compile } // { dg-options "" } // { dg-skip-if "-Wmain not enabled on SPU" { spu-*-* } } -int main(char a) {} /* { dg-warning "first argument of .*main.* should be .int." } */ -/* { dg-warning "main.* takes only zero or two arguments" "" { target *-*-* } 5 } */ +int main(char a) {} /* { dg-warning "first argument of .*main.* should be .int." "int" } */ +/* { dg-warning "main.* takes only zero or two arguments" "zero or two" { target *-*-* } 5 } */ Index: g++.old-deja/g++.other/typename1.C =================================================================== --- g++.old-deja/g++.other/typename1.C (revision 188540) +++ g++.old-deja/g++.other/typename1.C (working copy) @@ -13,5 +13,5 @@ template<class T> void f() { - Vector<T>::iterator i = 0; // { dg-error "typename" } missing typename -} // { dg-error "expected" "" { target *-*-* } 16 } + Vector<T>::iterator i = 0; // { dg-error "typename" "typename" } missing typename +} // { dg-error "expected" "expected" { target *-*-* } 16 } Index: g++.old-deja/g++.pt/niklas01a.C =================================================================== --- g++.old-deja/g++.pt/niklas01a.C (revision 188540) +++ g++.old-deja/g++.pt/niklas01a.C (working copy) @@ -2,8 +2,8 @@ // { dg-options "-fshow-column" } struct A { // { dg-error "" } forward declaration - friend struct B : A { // { dg-error "invalid use of incomplete type 'struct A" } + friend struct B : A { // { dg-error "invalid use of incomplete type 'struct A" "invalid" } int x; - }; // { dg-error "class definition may not be declared a friend" "" { target *-*-* } { 5 } } + }; // { dg-error "class definition may not be declared a friend" "may not" { target *-*-* } { 5 } } int y; };