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] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR 18050 : bogus warning with -Wsequence-point */
2
/* { dg-do compile } */
3
/* { dg-options "-Wsequence-point" } */
4
 
5
struct x
6
{
7
  int i;
8
};
9
void bar(struct x*, int *);
10
 
11
void foo(struct x *y)
12
{
13
  bar(y++, &y->i); /* { dg-warning "operation on 'y' may be undefined" } */
14
}
15
 
16
void zz(int a, int *b)
17
{
18
  *b = a;
19
}
20
 
21
void baz(void) {
22
  int a = 5;
23
  zz(++a, &a);  /* { dg-bogus "operation on 'a' may be undefined" } */
24
}

powered by: WebSVN 2.1.0

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