2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / comp-goto-2.c
blob85b0049fd46c2f437df6d303106e2a0487c2ea7c
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 "taking the address of a label is non-standard" } */
11 goto *p; /* { dg-warning "ISO C forbids 'goto \\*expr;'" } */
12 a: ;