summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/label-compound-stmt-1.c
blob: 2f8fa4e65c2232c943851d500a4c8aeac77641b1 (plain)
1
2
3
4
5
6
7
/* Test that labels at ends of compound statements are hard errors.  */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-options "" } */

void f(void) { g: } /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "label|parse|syntax" "label at end of compound statement" { target *-*-* } .-1 } */