aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm')
-rw-r--r--gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm b/gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm
new file mode 100644
index 000000000..35015c037
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm
@@ -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" } */
++ (id) new { return nil; }
+@end
+
+void function (void)
+{
+ DeprecatedClass *object = [DeprecatedClass new]; /* { dg-warning "is deprecated" } */
+}