aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/objc.dg/attributes/class-attribute-2.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/objc.dg/attributes/class-attribute-2.m')
-rw-r--r--gcc-4.9/gcc/testsuite/objc.dg/attributes/class-attribute-2.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/objc.dg/attributes/class-attribute-2.m b/gcc-4.9/gcc/testsuite/objc.dg/attributes/class-attribute-2.m
new file mode 100644
index 000000000..2e1bacb3f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/objc.dg/attributes/class-attribute-2.m
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+#include <objc/objc.h>
+
+__attribute__ ((deprecated))
+@interface DeprecatedClass
+{
+ Class isa;
+}
++ (id) new;
+@end
+
+__attribute__ ((deprecated))
+@implementation DeprecatedClass /* { dg-warning "prefix attributes are ignored for implementations" } */
++ (id) new { return nil; }
+@end
+
+void function (void)
+{
+ DeprecatedClass *object = [DeprecatedClass new]; /* { dg-warning "is deprecated" } */
+}