This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/4784] Anonymous structs issues
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 May 2010 16:20:05 -0000
- Subject: [Bug c/4784] Anonymous structs issues
- References: <bug-4784-230@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from jsm28 at gcc dot gnu dot org 2010-05-09 16:20 -------
Subject: Bug 4784
Author: jsm28
Date: Sun May 9 16:19:28 2010
New Revision: 159204
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159204
Log:
PR c/4784
* c-decl.c (detect_field_duplicates_hash): New. Handle anonymous
structures and unions recursively.
(detect_field_duplicates): Move duplicate detection with a hash to
detect_field_duplicates_hash. Always use a hash if anonymous
structures or unions are present.
* doc/extend.texi (Unnamed Fields): Document that duplicate fields
give errors.
testsuite:
* gcc.dg/anon-struct-9.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/anon-struct-9.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-decl.c
trunk/gcc/doc/extend.texi
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4784