* gcc.dg/ucnid-[23456].c: XFAIL on AIX.
[official-gcc.git] / gcc / testsuite / gcc.dg / comp-goto-2.c
blobbabfe9b5361a58dc202b5862f965f626a37abc2e
1 /* Test diagnostics for addresses of labels and computed gotos. Test
2 with -pedantic. */
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
4 /* { dg-do compile } */
5 /* { dg-options "-pedantic" } */
7 void
8 f (void)
10 void *p = &&a; /* { dg-warning "warning: taking the address of a label is non-standard" } */
11 goto *p; /* { dg-warning "warning: ISO C forbids 'goto \\*expr;'" } */
12 a: ;