aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/Wsequence-point-1.c
blob: 60dd55bbb08677cd4b1e3859ff571842ea5c2404 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR c++/57274 */
/* { dg-do compile } */
/* { dg-options "-Wsequence-point" } */

void foo (int, int);

void
bar (int *x)
{
  foo (*x++, sizeof (*x));	/* { dg-bogus "may be undefined" } */
}

void
baz (int *x)
{
  foo (*x, sizeof (*x++) + sizeof (*x++));	/* { dg-bogus "may be undefined" } */
}