URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* Test diagnostics for label declarations. Test with -pedantic. */
|
/* Test diagnostics for label declarations. Test with -pedantic. */
|
/* Origin: Joseph Myers <joseph@codesourcery.com> */
|
/* Origin: Joseph Myers <joseph@codesourcery.com> */
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-pedantic" } */
|
/* { dg-options "-pedantic" } */
|
|
|
typedef int b;
|
typedef int b;
|
|
|
void
|
void
|
f (void)
|
f (void)
|
{
|
{
|
__label__ a, b, c, d; /* { dg-warning "ISO C forbids label declarations" "label decls" { target *-*-* } 11 } */
|
__label__ a, b, c, d; /* { dg-warning "ISO C forbids label declarations" "label decls" { target *-*-* } 11 } */
|
__extension__ (void)&&d; /* { dg-error "label 'd' used but not defined" } */
|
__extension__ (void)&&d; /* { dg-error "label 'd' used but not defined" } */
|
goto c; /* { dg-error "label 'c' used but not defined" } */
|
goto c; /* { dg-error "label 'c' used but not defined" } */
|
a: (void)0;
|
a: (void)0;
|
b: (void)0;
|
b: (void)0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.