diff options
author | Nicola Pero <nicola@gcc.gnu.org> | 2010-12-30 08:59:29 +0000 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2010-12-30 08:59:29 +0000 |
commit | fd3ce292ae5796e7da960d332d50e34b6ab0fe91 (patch) | |
tree | 4d9b2cd60bffdd427dbbe13e6d69e05e66c25ae2 /gcc/objc | |
parent | 87ebde38c04dcb4511e6081e916a6c910ae39e8d (diff) | |
download | gcc-fd3ce292ae5796e7da960d332d50e34b6ab0fe91.zip gcc-fd3ce292ae5796e7da960d332d50e34b6ab0fe91.tar.gz gcc-fd3ce292ae5796e7da960d332d50e34b6ab0fe91.tar.bz2 |
In gcc/objc/: 2010-12-30 Nicola Pero <nicola@nicola.brainstorm.co.uk>
In gcc/objc/:
2010-12-30 Nicola Pero <nicola@nicola.brainstorm.co.uk>
* objc-act.c (start_class): Warn when a class attribute is
ignored.
(objc_declare_protocols): Warn when a protocol attribute in a
protocol forward-declaration is ignored.
(start_protocol): Warn when a protocol attribute is ignored.
In gcc/testsuite/:
2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/attributes/class-attribute-3.m: New.
* objc.dg/attributes/proto-attribute-4.m: New.
* obj-c++.dg/attributes/class-attribute-3.mm: New.
* obj-c++.dg/attributes/proto-attribute-4.mm: New.
From-SVN: r168337
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 562081b..b717a94 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,11 @@ +2010-12-30 Nicola Pero <nicola@nicola.brainstorm.co.uk> + + * objc-act.c (start_class): Warn when a class attribute is + ignored. + (objc_declare_protocols): Warn when a protocol attribute in a + protocol forward-declaration is ignored. + (start_protocol): Warn when a protocol attribute is ignored. + 2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_set_method_opt): Tidy up error messages. In diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index bc959d6..a0a7a09 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -9722,6 +9722,8 @@ start_class (enum tree_code code, tree class_name, tree super_name, if (is_attribute_p ("deprecated", name)) TREE_DEPRECATED (klass) = 1; + else + warning (OPT_Wattributes, "%qE attribute directive ignored", name); } TYPE_ATTRIBUTES (klass) = attributes; } @@ -10924,6 +10926,8 @@ objc_declare_protocols (tree names, tree attributes) if (is_attribute_p ("deprecated", name)) deprecated = true; + else + warning (OPT_Wattributes, "%qE attribute directive ignored", name); } } @@ -10977,6 +10981,8 @@ start_protocol (enum tree_code code, tree name, tree list, tree attributes) if (is_attribute_p ("deprecated", name)) deprecated = true; + else + warning (OPT_Wattributes, "%qE attribute directive ignored", name); } } |