summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/keywords-1.mm
blob: abb4537ae646c40e316ca66305e52a177adb52d1 (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
/* Test that 'in', 'out', 'inout', 'bycopy', 'byref', 'oneway'
   are not keywords outside of a "protocol qualifier" context.
*/
/* { dg-do compile } */

typedef int in;

in out (in inout)
{
  int byref = inout * 2;
  
  return byref + inout;
}

@class byref;

@interface inout
@end

@protocol oneway;

int main (void)
{
  in bycopy = (in)(out (0));

  return (in)bycopy;
}