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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [c-c++-common/] [warn-ommitted-condop.c] - Rev 686

Compare with Previous | Blame | View Log

/* { dg-options "-Wparentheses" } */
 
extern void f2 (int);
 
void bar (int x, int y, int z)
{
#define T(op) f2 (x op y ? : 1) 
#define T2(op) f2 (x op y ? 2 : 1) 
 
  T(<); /* { dg-warning "omitted middle operand" } */
  T(>); /* { dg-warning "omitted middle operand" } */
  T(<=); /* { dg-warning "omitted middle operand" } */
  T(>=); /* { dg-warning "omitted middle operand" } */
  T(==); /* { dg-warning "omitted middle operand" } */
  T(!=); /* { dg-warning "omitted middle operand" } */
  T(||); /* { dg-warning "omitted middle operand" } */
  T(&&); /* { dg-warning "omitted middle operand" } */
  f2 (!x ? : 1);  /* { dg-warning "omitted middle operand" } */
  T2(<); /* { dg-bogus "omitted middle operand" } */
  T2(>); /* { dg-bogus "omitted middle operand" } */
  T2(==); /* { dg-bogus "omitted middle operand" } */
  T2(||); /* { dg-bogus "omitted middle operand" } */
  T2(&&); /* { dg-bogus "omitted middle operand" } */
  T(+); /* { dg-bogus "omitted middle operand" } */
  T(-); /* { dg-bogus "omitted middle operand" } */
  T(*); /* { dg-bogus "omitted middle operand" } */
  T(/); /* { dg-bogus "omitted middle operand" } */
  T(^); /* { dg-bogus "omitted middle operand" } */
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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