aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr43082.c
blob: a6e00461673c76792f3686e780df7abced70539e (plain)
1
2
3
4
5
6
7
8
9
10
/* Test that the compiler does not crash when void expressions are
   found inside conditional expressions.  PR c/43082.  */
/* { dg-do compile } */

void
foo (int x)
{
  if (x ? (void)(0) : (void)(1)) /* { dg-error "void value not ignored as it ought to be" } */
    ;
}