summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/attributes/method-attribute-3.mm
blob: bab40d342ee37d80b3135a69a4e659a9fd599204 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do compile } */

#include "../../objc-obj-c++-shared/Object1.h"

@interface obj : Object {
@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" } */
}