blob: a3e01174eb94f5a18aa7d6af5ed09934aecc6e82 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001/* RUN: %clang_cc1 -fsyntax-only -verify %s
Chris Lattner95cfb852007-07-22 04:13:33 +00002*/
3
Chris Lattner4ae493c2011-02-18 02:08:43 +00004void test1() {
Chris Lattner95cfb852007-07-22 04:13:33 +00005 goto ; /* expected-error {{expected identifier}} */
6}
Chris Lattner4ae493c2011-02-18 02:08:43 +00007
8
9void test2() {
10 l: /* expected-note {{previous definition is here}} */
11
12 {
13 __label__ l;
14 l: goto l;
15 }
16
17 {
18 __label__ l;
19 __label__ h; /* expected-error {{use of undeclared label 'h'}} */
20 l: goto l;
21 }
22
23 /* PR3429 & rdar://8287027
24 */
25 {
26 l: /* expected-error {{redefinition of label 'l'}} */
27 ;
28 }
29
30}