diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2012-04-16 15:32:22 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2012-04-16 15:32:22 +0000 |
commit | 051b40ff6b44e7bfc6518db84ca56ccc10f95f57 (patch) | |
tree | 9a90c6960138f9284e38133c15d99290699783b9 /gcc/testsuite | |
parent | d6cb05db2ecffff53e2b9f5c291e7aed3bbf59ac (diff) | |
download | gcc-051b40ff6b44e7bfc6518db84ca56ccc10f95f57.zip gcc-051b40ff6b44e7bfc6518db84ca56ccc10f95f57.tar.gz gcc-051b40ff6b44e7bfc6518db84ca56ccc10f95f57.tar.bz2 |
re PR c++/49152 (pretty printer cannot handle iterators and other complex expressions)
/cp
2012-04-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/49152
* call.c (op_error): Print types; when flag_diagnostics_show_caret
is false print expressions too.
(op_error_string): Add.
/testsuite
2012-04-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/49152
* g++.dg/diagnostic/operator1.C: New.
* g++.dg/ext/label5.C: Adjust.
* g++.dg/ext/va-arg1.C: Likewise.
* g++.dg/other/error20.C: Likewise.
* g++.dg/other/error20.C: Likewise.
* g++.dg/other/error16.C: Likewise.
* g++.dg/other/error10.C: Likewise.
* g++.dg/parse/error30.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-err1.C: Likewise.
From-SVN: r186499
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err1.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/label5.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/va-arg1.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/error10.C | 3 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/error16.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/error20.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/error30.C | 4 |
8 files changed, 21 insertions, 9 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 27df0fb..1f70676 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2012-04-16 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/49152 + * g++.dg/diagnostic/operator1.C: New. + * g++.dg/ext/label5.C: Adjust. + * g++.dg/ext/va-arg1.C: Likewise. + * g++.dg/other/error20.C: Likewise. + * g++.dg/other/error20.C: Likewise. + * g++.dg/other/error16.C: Likewise. + * g++.dg/other/error10.C: Likewise. + * g++.dg/parse/error30.C: Likewise. + * g++.dg/cpp0x/lambda/lambda-err1.C: Likewise. + 2012-04-16 Jason Merrill <jason@redhat.com> PR c++/51148 diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err1.C index ebf0cbd..932ff1b 100644 --- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err1.C +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err1.C @@ -4,5 +4,5 @@ void foo() { int x[1]; - [x]{} = 0; // { dg-error "lambda closure" } + [x]{} = 0; // { dg-error "lambda" } } diff --git a/gcc/testsuite/g++.dg/ext/label5.C b/gcc/testsuite/g++.dg/ext/label5.C index fc611cd..34ca90d 100644 --- a/gcc/testsuite/g++.dg/ext/label5.C +++ b/gcc/testsuite/g++.dg/ext/label5.C @@ -2,5 +2,5 @@ // PR c++/24052 struct A { }; -int main() { b: A() && && b; } // { dg-error "A\\(\\) && && *b" } +int main() { b: A() && && b; } // { dg-error "operand types are 'A' and 'void\\*'" } // { dg-message "candidate|operator&&|no known conversion" "additional" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.dg/ext/va-arg1.C b/gcc/testsuite/g++.dg/ext/va-arg1.C index 079db2e..5606128 100644 --- a/gcc/testsuite/g++.dg/ext/va-arg1.C +++ b/gcc/testsuite/g++.dg/ext/va-arg1.C @@ -4,5 +4,5 @@ struct A {}; void foo() { - ++__builtin_va_arg(0, A); // { dg-error "'\\+\\+va_arg\\(0, A\\)'" } + ++__builtin_va_arg(0, A); // { dg-error "operand type is 'A'" } } diff --git a/gcc/testsuite/g++.dg/other/error10.C b/gcc/testsuite/g++.dg/other/error10.C index 5c17277..546a4d6 100644 --- a/gcc/testsuite/g++.dg/other/error10.C +++ b/gcc/testsuite/g++.dg/other/error10.C @@ -6,10 +6,9 @@ template<int> struct A {}; template<int N> void foo(const A<N> &a) -{ -A<N>(a); } // { dg-error "\\(\\* & a\\)" "" } +{ -A<N>(a); } // { dg-error "operand type is 'A<0>'" } void bar() { foo(A<0>()); // { dg-message "required from here" "" } } - diff --git a/gcc/testsuite/g++.dg/other/error16.C b/gcc/testsuite/g++.dg/other/error16.C index 1e34647..38c0fd6 100644 --- a/gcc/testsuite/g++.dg/other/error16.C +++ b/gcc/testsuite/g++.dg/other/error16.C @@ -10,5 +10,5 @@ typedef Outer<X> XOuter; int main() { Outer<int> ab; - ab.foo() == 1; // { dg-error "ab.Outer" } + ab.foo() == 1; // { dg-error "operand types are 'Outer<int>::Inner' and 'int'" } } diff --git a/gcc/testsuite/g++.dg/other/error20.C b/gcc/testsuite/g++.dg/other/error20.C index f3b17aa1..bb7d7b3 100644 --- a/gcc/testsuite/g++.dg/other/error20.C +++ b/gcc/testsuite/g++.dg/other/error20.C @@ -8,6 +8,6 @@ struct A // { dg-message "operator=|no known conversion" } void bar (A& a) { - a.foo () = 0; // { dg-error "A::foo\\(\\) = 0" } + a.foo () = 0; // { dg-error "operand types are 'A' and 'int'" } // { dg-message "candidate" "candidate note" { target *-*-* } 11 } } diff --git a/gcc/testsuite/g++.dg/parse/error30.C b/gcc/testsuite/g++.dg/parse/error30.C index 26c55c4..aabdcc7 100644 --- a/gcc/testsuite/g++.dg/parse/error30.C +++ b/gcc/testsuite/g++.dg/parse/error30.C @@ -8,5 +8,5 @@ struct A A(int); }; -A a = -A(); // { dg-error "10:no match for.*operator-.*in.*-A\\(\\)" } -A b = -A(5); // { dg-error "11:no match for.*operator-.*in.*-A\\(5\\)" } +A a = -A(); // { dg-error "operand type is 'A'" } +A b = -A(5); // { dg-error "operand type is 'A'" } |