OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [label-decl-2.c] - Blame information for rev 300

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* 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; /* { dg-warning "ISO C forbids label declarations" "label decls" { target *-*-* } 11 } */
12
  __extension__ (void)&&d; /* { dg-error "label 'd' used but not defined" } */
13
  goto c; /* { dg-error "label 'c' used but not defined" } */
14
 a: (void)0;
15
 b: (void)0;
16
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.