OSDN Git Service

* gcc.dg/altivec-vec-merge.c: Make test usable on GNU/Linux targets
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / label-decl-2.c
1 /* Test diagnostics for label declarations.  Test with -pedantic.  */
2 /* Origin: Joseph Myers <joseph@codesourcery.com> */
3 /* { dg-do compile } */
4 /* { dg-options "-pedantic" } */
5
6 typedef int b;
7
8 void
9 f (void)
10 {
11   __label__ a, b, c, d;
12   __extension__ (void)&&d; /* { dg-error "error: label 'd' used but not defined" } */
13   /* { dg-warning "warning: ISO C forbids label declarations" "label decls" { target *-*-* } 12 } */
14   goto c; /* { dg-error "error: label 'c' used but not defined" } */
15  a: (void)0;
16  b: (void)0;
17 }