re PR c/67580 (Improve error message on missing "struct" tag)
authorMarek Polacek <polacek@redhat.com>
Tue, 15 Sep 2015 17:19:11 +0000 (17:19 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 15 Sep 2015 17:19:11 +0000 (17:19 +0000)
commit0e36f5c7c103e2d897fcbc9728fa98768b386f9a
treeea4ad4601177b57e46c4c68bebdfb4668db9e541
parentc33c18cdc6b29a312464cb16996530b47a333c98
re PR c/67580 (Improve error message on missing "struct" tag)

PR c/67580
* c-decl.c (tag_exists_p): New function.
* c-parser.c (c_parser_declaration_or_fndef): Give a hint when
struct/union/enum keywords are missing.
* c-tree.h (tag_exists_p): Declare.

* gcc.dg/pr67580.c: New test.

From-SVN: r227803
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/c/c-parser.c
gcc/c/c-tree.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr67580.c [new file with mode: 0644]