OSDN Git Service

* gcc.dg/Warray-bounds.c: XFAIL test on 32-bit hppa targets.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / comp-goto-3.c
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" } */
6
7 void
8 f (void)
9 {
10   void *p = &&a; /* { dg-error "error: taking the address of a label is non-standard" } */
11   goto *p; /* { dg-error "error: ISO C forbids 'goto \\*expr;'" } */
12  a: ;
13 }