OSDN Git Service

PR c/4784
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 May 2010 16:19:28 +0000 (16:19 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:04:03 +0000 (14:04 +0900)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159204 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/anon-struct-9.c

index 3a9d1f9..8879737 100644 (file)
@@ -1,3 +1,14 @@
+2010-05-09  Joseph Myers  <joseph@codesourcery.com>
+
+       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.
+
 2010-05-09  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/44046
index bd28f18..cf4140d 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-09  Joseph Myers  <joseph@codesourcery.com>
+
+       PR c/4784
+       * gcc.dg/anon-struct-9.c: New test.
+
 2010-05-09  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/44043
index d223490..2658ccb 100644 (file)
@@ -120,8 +120,8 @@ struct sbig
   S10(f)
   S10(g)
   S10(h)
+  S10(i)
   S10(j)
-  S10(k)
   struct
   {
     int a123; /* { dg-error "duplicate member" } */