summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/keywords-3.m
blob: 28c2cf50e17c4c80cc0f931764dd4e5ceda54ca1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Test that 'class', 'public', 'private', protected', 'try', 'catch',
   'throw' are not keywords in pure Objective-C if not after a '@'.
*/
/* { dg-do compile } */

int class (int public)
{
  int private = public;
  int protected = private * 2;
  int try = protected * 2;
  int catch = try * 2;
  int throw = catch * 2;

  return throw;
}

int main (void)
{
  return class (0);
}