OSDN Git Service

* c-tree.h (enum c_typespec_kind, struct c_typespec,
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Oct 2004 00:34:01 +0000 (00:34 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Oct 2004 00:34:01 +0000 (00:34 +0000)
commit19702c1d34daddd799073407407ff47a44d0084c
treed480ea1c4408842eab54602e3d430ca39cc2a0b7
parenta86d7a65a99e943f5cd93f16e1d8b8b9c31ff1b1
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89021 138bc75d-0d04-0410-961f-82ee72b054a4
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]