aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/objc.dg/attributes/method-attribute-3.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/objc.dg/attributes/method-attribute-3.m')
-rw-r--r--gcc-4.9/gcc/testsuite/objc.dg/attributes/method-attribute-3.m24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/objc.dg/attributes/method-attribute-3.m b/gcc-4.9/gcc/testsuite/objc.dg/attributes/method-attribute-3.m
new file mode 100644
index 000000000..1af1d117d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/objc.dg/attributes/method-attribute-3.m
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+
+#include "../../objc-obj-c++-shared/TestsuiteObject.h"
+
+@interface obj : TestsuiteObject {
+@public
+ int var;
+}
+- (int) vargsn: (int) count, ... __attribute__((deprecated));
+@end
+
+@implementation obj
+- (int) vargsn: (int) count, ...
+{
+ return 0;
+}
+@end
+
+int foo (void)
+{
+ obj *p = [obj new];
+
+ return [p vargsn:0]; /* { dg-warning "'vargsn:' is deprecated .declared at " } */
+}