gcc/testsuite/objc.dg/naming-1.m
raw| 1 | /* Test for obscuring of @interfaces with local vars. */ |
| 2 | /* Author: Ziemowit Laski <[email protected]>. */ |
| 3 | /* { dg-do compile } */ |
| 4 | |
| 5 | @interface View |
| 6 | @end |
| 7 | |
| 8 | void foo(void) |
| 9 | { |
| 10 | int View; /* ok */ |
| 11 | View = 1; /* ok */ |
| 12 | View *view; /* { dg-error "undeclared|only once|it appears" } */ |
| 13 | } |
| 14 | |
| 15 | void bar(void) |
| 16 | { |
| 17 | View *view; /* ok */ |
| 18 | View = 1; /* { dg-error "parse error|syntax error|expected" } */ |
| 19 | } |