OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [gnu-cond-expr-3.c] - Diff between revs 149 and 154

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* 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 "error: ISO C forbids omitting the middle term of a \\?: expression" } */
  c = (++a ? : b); /* { dg-error "error: ISO C forbids omitting the middle term of a \\?: expression" } */
}
}
 
 

powered by: WebSVN 2.1.0

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