c-tree.h (enum c_typespec_kind, [...]): New.
authorJoseph Myers <jsm@polyomino.org.uk>
Thu, 14 Oct 2004 00:34:01 +0000 (01:34 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Thu, 14 Oct 2004 00:34:01 +0000 (01:34 +0100)
commit81da229b08e74978a0dfb5bca48138a0a4a2357c
treed480ea1c4408842eab54602e3d430ca39cc2a0b7
parent599a049f76abea81f4e5534520529aa9f5fadf0d
c-tree.h (enum c_typespec_kind, [...]): New.

* c-tree.h (enum c_typespec_kind, struct c_typespec,
parser_xref_tag): New.
(struct c_declspecs): Add tag_defined_p.  Adjust definition of
typedef_p.
(declspecs_add_type): Adjust prototypes.
* c-parse.in (%union): Add tstype.
(typespec_nonattr, typespec_attr, typespec_reserved_nonattr,
typespec_reserved_attr, typespec_nonreserved_nonattr,
structsp_attr, structsp_nonattr): Change to tstype.  Update
actions.
* c-decl.c (build_null_declspecs): Initialize tag_defined_p.
(declspecs_add_type): Update to take struct c_typespec argument.
Set tag_defined_p and typedef_p as appropriate.
(xref_tag): Rename to parser_xref_tag and replace by wrapper.
Update to return struct c_typespec.
(shadow_tag_warned): Don't let empty declarations with qualifiers
or storage class specifiers redeclare a tag if a previous
declaration is visible.

testsuite:
* gcc.dg/c99-tag-3.c, gcc.dg/declspec-14.c: New tests.

From-SVN: r89021
gcc/ChangeLog
gcc/c-decl.c
gcc/c-parse.in
gcc/c-tree.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c99-tag-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/declspec-14.c [new file with mode: 0644]