aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-05-19 09:37:45 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2005-05-19 09:37:45 +0200
commit389c6c8b5b9e67ed40847e3052a12a87b12e9bef (patch)
tree23a31b01e3a536d79042437defa6f7754629aaf9 /gcc/cp/decl.c
parentf0cd747eb3b1c297945e87b2a322a06367b840c6 (diff)
downloadgcc-389c6c8b5b9e67ed40847e3052a12a87b12e9bef.zip
gcc-389c6c8b5b9e67ed40847e3052a12a87b12e9bef.tar.gz
gcc-389c6c8b5b9e67ed40847e3052a12a87b12e9bef.tar.bz2
re PR c++/21495 (internal compiler error: Segmentation fault)
PR c++/21495 * decl.c (grokdeclarator): Fix "storage class specified for" error reporting. * g++.dg/parse/extern1.C: New test. * g++.dg/tls/diag-2.C: Adjust expected error message wording. From-SVN: r99960
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 529cfd5..eb8db91 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -7002,30 +7002,7 @@ grokdeclarator (const cp_declarator *declarator,
else
{
if (decl_context == FIELD)
- {
- tree tmp = NULL_TREE;
- int op = 0;
-
- if (declarator)
- {
- /* Avoid trying to get an operand off an identifier node. */
- if (declarator->kind != cdk_id)
- tmp = declarator->declarator->u.id.unqualified_name;
- else
- tmp = declarator->u.id.unqualified_name;
- op = IDENTIFIER_OPNAME_P (tmp);
- if (IDENTIFIER_TYPENAME_P (tmp))
- {
- if (is_typename_at_global_scope (tmp))
- name = IDENTIFIER_POINTER (tmp);
- else
- name = "<invalid operator>";
- }
- }
- error ("storage class specified for %s %qs",
- op ? "member operator" : "field",
- name);
- }
+ error ("storage class specified for %qs", name);
else
{
if (decl_context == PARM || decl_context == CATCHPARM)