summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/attributes/unused-parameter-1.mm
blob: 8fbb11e201425fd0653f138e7b6cd5b8aaaf76a7 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* { dg-do compile } */

#include <objc/objc.h>

@interface MyRootClass
{
  Class isa;
}
- (id) method1: (id) argument1;
- (id) method2: (id) __attribute__((unused)) argument1;
- (id) method3: (id) __attribute__((unused)) argument1
   andArgument: (id) argument2;
- (id) method4: (id) __attribute__((unused)) argument1
   andArgument: (id) __attribute__((unused)) argument2;
- (id) method5: (id) argument1
   andArgument: (id) __attribute__ ((unused)) argument2;
- (id) method6: (id) argument1
   andArgument: (id) argument2;
@end

@implementation MyRootClass
- (id) method1: (id) argument1
{
  return nil;
}
- (id) method2: (id) __attribute__((unused)) argument1
{
  return nil;
}
- (id) method3: (id) __attribute__((unused)) argument1
   andArgument: (id) argument2
{
  return nil;
}
- (id) method4: (id) __attribute__((unused)) argument1
   andArgument: (id) __attribute__((unused)) argument2
{
  return nil;
}
- (id) method5: (id) argument1
   andArgument: (id) __attribute__ ((unused)) argument2
{
  return nil;
}
- (id) method6: (id) argument1
   andArgument: (id) argument2
{
  return nil;
}
@end