diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2002-10-11 18:25:10 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2002-10-11 18:25:10 +0000 |
commit | 2ee366b54aaf49c79bb52f1ea37fe9b67189f05b (patch) | |
tree | 2c9f37da9b80d6320b9e389d50fa1029d36ca89b /gcc/cp | |
parent | 01c3fb158c67846552e655c4ed4707d5e281eac4 (diff) | |
download | gcc-2ee366b54aaf49c79bb52f1ea37fe9b67189f05b.zip gcc-2ee366b54aaf49c79bb52f1ea37fe9b67189f05b.tar.gz gcc-2ee366b54aaf49c79bb52f1ea37fe9b67189f05b.tar.bz2 |
PRs C++/6803, C++/7721 and C++/7803
PRs C++/6803, C++/7721 and C++/7803
* decl.c (grokdeclarator): Gracefully handle template-name as
decl-specifier.
From-SVN: r58058
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl.c | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 01f8551..200bc39 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net> + + PRs C++/6803, C++/7721 and C++/7803 + * decl.c (grokdeclarator): Gracefully handle template-name as + decl-specifier. + 2002-10-11 Jason Molenda <jmolenda@apple.com> * init.c (build_field_list): Provide uses_unions_p with a default diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index f4651db..f8202b4 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10249,6 +10249,15 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) case BASELINK: next = &BASELINK_FUNCTIONS (decl); break; + + case TEMPLATE_DECL: + /* Sometimes, we see a template-name used as part of a + decl-specifier like in + std::allocator alloc; + Handle that gracefully. */ + error ("invalid use of template-name '%E' in a declarator", decl); + return error_mark_node; + break; default: my_friendly_assert (0, 20020917); |