diff options
Diffstat (limited to 'gcc/attribs.c')
-rw-r--r-- | gcc/attribs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c index 3ecc473d694..7377c57691d 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -250,6 +250,14 @@ decl_attributes (tree *node, tree attributes, int flags) } } + if (TYPE_P (*anode) + && (flags & (int) ATTR_FLAG_TYPE_IN_PLACE) + && TYPE_SIZE (*anode) != NULL_TREE) + { + warning (OPT_Wattributes, "type attributes ignored after type is already defined"); + continue; + } + if (spec->handler != NULL) returned_attrs = chainon ((*spec->handler) (anode, name, args, flags, &no_add_attrs), |