URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 384 |
/* Test diagnostic for GNU extension: omitting middle term of
|
/* Test diagnostic for GNU extension: omitting middle term of
|
conditional expression. Test with -pedantic-errors. */
|
conditional expression. Test with -pedantic-errors. */
|
/* Origin: Joseph Myers <joseph@codesourcery.com> */
|
/* Origin: Joseph Myers <joseph@codesourcery.com> */
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-std=gnu99 -pedantic-errors" } */
|
/* { dg-options "-std=gnu99 -pedantic-errors" } */
|
|
|
int a, b, c;
|
int a, b, c;
|
|
|
void
|
void
|
f (void)
|
f (void)
|
{
|
{
|
c = (++a ? : b); /* { dg-error "ISO C forbids omitting the middle term of a \\?: expression" } */
|
c = (++a ? : b); /* { dg-error "ISO C forbids omitting the middle term of a \\?: expression" } */
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.