summaryrefslogtreecommitdiffstats
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-08 06:48:21 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-08 06:48:21 +0000
commit78ba9fedc8faeb2657f8b39ea18cbd80ccdc35d3 (patch)
tree499aa3c7dffb31031e454f7b8479fd3655391c0f /gcc/c-decl.c
parent636fad7abdcf5d830186700b7145265310eaaa28 (diff)
downloadppe42-gcc-78ba9fedc8faeb2657f8b39ea18cbd80ccdc35d3.tar.gz
ppe42-gcc-78ba9fedc8faeb2657f8b39ea18cbd80ccdc35d3.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122684 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index b2bed24afd8..0d9fce559e7 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;
OpenPOWER on IntegriCloud