URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
/* Test diagnostics for addresses of labels and computed gotos. Test
|
/* Test diagnostics for addresses of labels and computed gotos. Test
|
with -pedantic. */
|
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" } */
|
|
|
void
|
void
|
f (void)
|
f (void)
|
{
|
{
|
void *p = &&a; /* { dg-warning "warning: taking the address of a label is non-standard" } */
|
void *p = &&a; /* { dg-warning "warning: taking the address of a label is non-standard" } */
|
goto *p; /* { dg-warning "warning: ISO C forbids 'goto \\*expr;'" } */
|
goto *p; /* { dg-warning "warning: ISO C forbids 'goto \\*expr;'" } */
|
a: ;
|
a: ;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.