PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / comp-goto-3.c
blob5a3b4d2cad4f1e66fa96a9adb9583c024366a645
1 /* Test diagnostics for addresses of labels and computed gotos. Test
2 with -pedantic-errors. */
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
4 /* { dg-do compile } */
5 /* { dg-options "-pedantic-errors" } */
7 void
8 f (void)
10 void *p = &&a; /* { dg-error "taking the address of a label is non-standard" } */
11 goto *p; /* { dg-error "ISO C forbids 'goto \\*expr;'" } */
12 a: ;