libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-labels-2.c
blobceef503feb5339247fbd21b53a2453d85db61e87
1 /* Tests for labels before declarations and at ends of compound statements. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c23 -Wc11-c23-compat" } */
5 int f(int x)
6 {
7 goto b;
8 a: int i = 2 * x; /* { dg-warning "a label can only be part of a statement and a declaration is not a statement" } */
9 goto c;
10 b: goto a;
11 { i *= 3; c: } /* { dg-warning "label at end of compound statement" } */
12 return i;
13 d: /* { dg-warning "label at end of compound statement" } */