+2005-05-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/21495
+ * decl.c (grokdeclarator): Fix "storage class specified for"
+ error reporting.
+
2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
* parser.c: Fix comment typos.
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)
+2005-05-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/21495
+ * g++.dg/parse/extern1.C: New test.
+ * g++.dg/tls/diag-2.C: Adjust expected error message wording.
+
2005-05-19 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/c99-math.h: New.
void bar(__thread int p1); /* { dg-error "(invalid in parameter)|(specified for parameter)" } */
struct A {
- __thread int i; /* { dg-error "specified for field" } */
+ __thread int i; /* { dg-error "storage class specified" } */
};