view gcc/testsuite/g++.dg/warn/sequence-pt-3.C @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* More sequence point warning tests  */
/* { dg-do compile } */
/* { dg-options "-Wsequence-point" } */

void bar(int i, int j)
{
  return;
}

void foo (int i)
{
   int a = i-i++; (void)a; /* { dg-warning "undefined" "sequence point warning" } */

   bar (i--, i++); /* { dg-warning "undefined" "sequence point warning" } */
}