1 // RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic
3 // Test that we can parse declarations at global scope.
7 // Test that we can parse declarations within a compound statement.
13 int z
= ({ // expected-warning {{use of GNU statement expression extension}}
14 // Test that we can parse declarations within a GNU statement expression.
19 // Test that we diagnose declarations where a statement is required.
22 int x
; // expected-error {{expected expression}}
24 int c
; // expected-error {{expected expression}}
27 int y
; // expected-warning {{label followed by a declaration is a C23 extension}}
29 // Test that lookup works as expected.
33 (void)b
; // expected-error {{use of undeclared identifier 'b'}}
34 (void)w
; // expected-error {{use of undeclared identifier 'w'}}
35 (void)x
; // expected-error {{use of undeclared identifier 'x'}}
36 (void)c
; // expected-error {{use of undeclared identifier 'c'}}