diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2007-03-08 06:48:21 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2007-03-08 06:48:21 +0000 |
commit | ab53bae286a176f4d0e5e3a780d9990c03a2f2be (patch) | |
tree | 499aa3c7dffb31031e454f7b8479fd3655391c0f /gcc/c-decl.c | |
parent | cd265edd7b9956ebb53c2fe092daf4ee30027fd9 (diff) | |
download | gcc-ab53bae286a176f4d0e5e3a780d9990c03a2f2be.zip gcc-ab53bae286a176f4d0e5e3a780d9990c03a2f2be.tar.gz gcc-ab53bae286a176f4d0e5e3a780d9990c03a2f2be.tar.bz2 |
c-decl.c (grokdeclarator): Disable warnings for anonymous bitfields.
gcc/ChangeLog:
* c-decl.c (grokdeclarator): Disable warnings for anonymous
bitfields.
* tree-sra.c (instantiate_element): Propagate disabled warnings
from the element itself to the created variable.
gcc/cp/ChangeLog:
* decl.c (grokdeclarator): Disable warnings for anonymous
bitfields.
From-SVN: r122684
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index b2bed24..0d9fce5 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -4748,6 +4748,8 @@ grokdeclarator (const struct c_declarator *declarator, type = c_build_qualified_type (type, type_quals); decl = build_decl (FIELD_DECL, declarator->u.id, type); DECL_NONADDRESSABLE_P (decl) = bitfield; + if (bitfield && !declarator->u.id) + TREE_NO_WARNING (decl) = 1; if (size_varies) C_DECL_VARIABLE_SIZE (decl) = 1; |