diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-02 07:51:40 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-02 07:51:40 +0000 |
commit | 947ccd60b0eceddb6bbe41bb06df5f629692fb54 (patch) | |
tree | 91d22524cf3c9a0b520a42fa14fc4fd6c4dee098 /gcc | |
parent | 40d6aa75360e1531ea1635ab5b6721414b18898d (diff) | |
download | gcc-947ccd60b0eceddb6bbe41bb06df5f629692fb54.tar.gz |
/cp
2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
* pt.c (convert_template_argument): Use inform instead of error in
three places.
/testsuite
2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/cpp0x/variadic-ex10.C: Adjust for inform instead of error.
* g++.dg/cpp0x/variadic-ex14.C: Likewise.
* g++.dg/parse/error11.C: Likewise.
* g++.old-deja/g++.brendan/template17.C: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212223 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 24 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/error11.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.brendan/template17.C | 4 |
7 files changed, 33 insertions, 15 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 67c7af5491e..dd6279af49c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2014-07-02 Paolo Carlini <paolo.carlini@oracle.com> + + * pt.c (convert_template_argument): Use inform instead of error in + three places. + 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net> PR c++/58781 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 355b63e50f1..7bbbf0301ff 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6468,13 +6468,16 @@ convert_template_argument (tree parm, "parameter list for %qD", i + 1, in_decl); if (is_type) - error (" expected a constant of type %qT, got %qT", - TREE_TYPE (parm), - (DECL_P (arg) ? DECL_NAME (arg) : orig_arg)); + inform (input_location, + " expected a constant of type %qT, got %qT", + TREE_TYPE (parm), + (DECL_P (arg) ? DECL_NAME (arg) : orig_arg)); else if (requires_tmpl_type) - error (" expected a class template, got %qE", orig_arg); + inform (input_location, + " expected a class template, got %qE", orig_arg); else - error (" expected a type, got %qE", orig_arg); + inform (input_location, + " expected a type, got %qE", orig_arg); } } return error_mark_node; @@ -6487,9 +6490,11 @@ convert_template_argument (tree parm, "parameter list for %qD", i + 1, in_decl); if (is_tmpl_type) - error (" expected a type, got %qT", DECL_NAME (arg)); + inform (input_location, + " expected a type, got %qT", DECL_NAME (arg)); else - error (" expected a class template, got %qT", orig_arg); + inform (input_location, + " expected a class template, got %qT", orig_arg); } return error_mark_node; } @@ -6537,8 +6542,9 @@ convert_template_argument (tree parm, error ("type/value mismatch at argument %d in " "template parameter list for %qD", i + 1, in_decl); - error (" expected a template of type %qD, got %qT", - parm, orig_arg); + inform (input_location, + " expected a template of type %qD, got %qT", + parm, orig_arg); } val = error_mark_node; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f34dccbb570..2947c76e312 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2014-07-02 Paolo Carlini <paolo.carlini@oracle.com> + + * g++.dg/cpp0x/variadic-ex10.C: Adjust for inform instead of error. + * g++.dg/cpp0x/variadic-ex14.C: Likewise. + * g++.dg/parse/error11.C: Likewise. + * g++.old-deja/g++.brendan/template17.C: Likewise. + 2014-07-02 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray/get_array.f90: Add missing SYNC ALL. diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C index 3df356aaf3c..740a45e5127 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C @@ -5,5 +5,5 @@ 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" "mismatch" } -// { dg-error "expected a type" "expected a type" { target *-*-* } 7 } +// { dg-message "expected a type" "expected a type" { target *-*-* } 7 } // { dg-error "in declaration" "in declaration" { target *-*-* } 7 } diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C index 600b798684a..88c714e153d 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C @@ -9,10 +9,10 @@ template<template<class...> class Q> class Y { /* ... */ }; X<A> xA; // okay X<B> xB; // { dg-error "mismatch" "mismatch" } -// { dg-error "expected a template" "expected" { target *-*-* } 11 } +// { dg-message "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-message "expected a template" "expected" { target *-*-* } 14 } // { dg-error "invalid type" "invalid" { target *-*-* } 14 } Y<A> yA; Y<B> yB; diff --git a/gcc/testsuite/g++.dg/parse/error11.C b/gcc/testsuite/g++.dg/parse/error11.C index 319e6acf2b0..846e676c9c0 100644 --- a/gcc/testsuite/g++.dg/parse/error11.C +++ b/gcc/testsuite/g++.dg/parse/error11.C @@ -33,7 +33,7 @@ template <int N> struct Foo2 {}; template struct Foo2<::B>; // { dg-error "21:'<::' cannot begin" "begin" { target { ! c++11 } } } // { dg-message "21:'<:' is an alternate" "alt" { target { ! c++11 } } 33 } // { dg-message "25:type/value mismatch" "mismatch" { target *-*-* } 33 } -// { dg-error "25:expected a constant" "const" { target *-*-* } 33 } +// { dg-message "25:expected a constant" "const" { target *-*-* } 33 } int value = 0; diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/template17.C b/gcc/testsuite/g++.old-deja/g++.brendan/template17.C index 5f2d45f1cc8..94eaf3d0da2 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/template17.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/template17.C @@ -9,7 +9,7 @@ public: }; const Regex NDAMName<'L'>::pattern("^[Ll](.*)$", 1);// { dg-error "type/value mismatch" "mismatch" } -// { dg-error "expected a type" "expected" { target *-*-* } 11 } +// { dg-message "expected a type" "expected" { target *-*-* } 11 } // { dg-warning "deprecated" "depr" { target *-*-* } 11 } unsigned NDAMName<'L'>::sequence_number = 0;// { dg-error "type/value mismatch" "mismatch" } -// { dg-error "expected a type" "exp" { target *-*-* } 14 } +// { dg-message "expected a type" "exp" { target *-*-* } 14 } |