diff options
| author | Paolo Carlini <pcarlini@suse.de> | 2007-07-11 09:18:39 +0000 |
|---|---|---|
| committer | Paolo Carlini <paolo@gcc.gnu.org> | 2007-07-11 09:18:39 +0000 |
| commit | b8ade4078ef959cee0343844a11bf9fca8ade916 (patch) | |
| tree | e99401a5dbba9c6e42c3e69eadc777155804393c /gcc/cp/parser.c | |
| parent | 0136f2f71ad3911e4efebe11670422a5cc3efc16 (diff) | |
| download | gcc-b8ade4078ef959cee0343844a11bf9fca8ade916.zip gcc-b8ade4078ef959cee0343844a11bf9fca8ade916.tar.gz gcc-b8ade4078ef959cee0343844a11bf9fca8ade916.tar.bz2 | |
re PR c++/32560 (ICE on invalid declaration in template)
/cp
2007-07-11 Paolo Carlini <pcarlini@suse.de>
PR c++/32560
* parser.c (cp_parser_make_indirect_declarator): When the
the code argument is ERROR_MARK return cp_error_declarator.
/testsuite
2007-07-11 Paolo Carlini <pcarlini@suse.de>
PR c++/32560
* g++.dg/template/decl3.C: New.
From-SVN: r126542
Diffstat (limited to 'gcc/cp/parser.c')
| -rw-r--r-- | gcc/cp/parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 0bd33d6..b49b9f8 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -2702,6 +2702,9 @@ cp_parser_make_indirect_declarator (enum tree_code code, tree class_type, cp_cv_quals cv_qualifiers, cp_declarator *target) { + if (code == ERROR_MARK) + return cp_error_declarator; + if (code == INDIRECT_REF) if (class_type == NULL_TREE) return make_pointer_declarator (cv_qualifiers, target); |
