aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cond-lvalue-1.c
blob: 1765546e3421babbcf10330c93850752ed42d297 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* Test for deprecation of conditional expressions as lvalues.  */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-options "" } */

int x, y, z;

void
foo (void)
{
  (x ? y : z) = 1; /* { dg-warning "lvalue" "conditional expression as lvalue deprecated" } */
}