summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/attributes/parameter-attribute-2.mm
blob: 3908faf99d92679d89968c20a7956484ed934d0e (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
/* Test that we get warnings for unrecognized attributes.  */
/* { dg-do compile } */

#include <objc/objc.h>

@interface MyRootClass
{
  Class isa;
}
/* TODO: Emit warnings in the @interface as well.  Currently we only emit
   them in @implementation.  */
+ (id) method1: (id) __attribute__ ((xxxxx)) argument1;
+ (id) method2: (id) __attribute__ ((noinline)) argument1;
@end

@implementation MyRootClass
+ (id) method1: (id) __attribute__ ((xxxxx)) argument1  /* { dg-warning ".xxxxx. attribute directive ignored" } */
{
  return argument1;
}
+ (id) method2: (id) __attribute__ ((noinline)) argument1 /* { dg-warning ".noinline. attribute ignored" } */
{
  return argument1;
}
@end