aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm')
-rw-r--r--gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm b/gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm
new file mode 100644
index 000000000..3993c5f17
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm
@@ -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" } */
+}