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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [Wsequence-point-pr18050.c] - Rev 826

Compare with Previous | Blame | View Log

/* PR 18050 : bogus warning with -Wsequence-point */
/* { dg-do compile } */
/* { dg-options "-Wsequence-point" } */
 
struct x
{
  int i;
};
void bar(struct x*, int *);
 
void foo(struct x *y)
{
  bar(y++, &y->i); /* { dg-warning "operation on 'y' may be undefined" } */
}
 
void zz(int a, int *b)
{
  *b = a;
}
 
void baz(void) {
  int a = 5;
  zz(++a, &a);  /* { dg-bogus "operation on 'a' may be undefined" } */
}
 

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.