diff options
author | Mark Mitchell <mark@codesourcery.com> | 2006-01-15 00:56:50 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2006-01-15 00:56:50 +0000 |
commit | 9e2813200c82c9fef227cef9a1da0c2f89d1d837 (patch) | |
tree | f218b5ba4cdacf970b9e892abf6eb2a8670a063b /gcc | |
parent | cfa4da9b6da8c82be39350ce799a0ee503496a0f (diff) | |
download | gcc-9e2813200c82c9fef227cef9a1da0c2f89d1d837.zip gcc-9e2813200c82c9fef227cef9a1da0c2f89d1d837.tar.gz gcc-9e2813200c82c9fef227cef9a1da0c2f89d1d837.tar.bz2 |
re PR c++/25663 (Trouble parsing nested templated constructor calls)
PR c++/25663
* parser.c (cp_parser_direct_declarator): Use cp_parser_error
instead of error.
PR c++/25663
* g++.dg/template/ctor6.C: New test.
From-SVN: r109713
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/ctor6.C | 11 |
4 files changed, 23 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8c5a33c..96cf0a9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2006-01-14 Mark Mitchell <mark@codesourcery.com> + + PR c++/25663 + * parser.c (cp_parser_direct_declarator): Use cp_parser_error + instead of error. + 2006-01-13 Jason Merrill <jason@redhat.com> * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 637e183..8e11d43 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -11505,7 +11505,7 @@ cp_parser_direct_declarator (cp_parser* parser, here because we do not have enough information about its original syntactic form. */ - error ("invalid declarator"); + cp_parser_error (parser, "invalid declarator"); declarator = cp_error_declarator; break; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5567ae3..bf07e66 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-01-14 Mark Mitchell <mark@codesourcery.com> + + PR c++/25663 + * g++.dg/template/ctor6.C: New test. + 2006-01-14 Kazu Hirata <kazu@codesourcery.com> PR tree-optimization/25485 diff --git a/gcc/testsuite/g++.dg/template/ctor6.C b/gcc/testsuite/g++.dg/template/ctor6.C new file mode 100644 index 0000000..4f21dc9 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/ctor6.C @@ -0,0 +1,11 @@ +// PR c++/25663 + +template<int> struct A +{ + A(int); +}; + +void foo() +{ + A<0>(A<0>(0)); +} |