1 // { dg-do run } 2 // Testcase for precedence of ?: wrt = 3 4 extern "C" int printf (const char *, ...); 5 main()6int main() 7 { 8 int j = 0, k = 0; 9 1 ? j : k = 5; // should be parsed 1 ? j : (k = 5) 10 (void) (1 ? k = 5 : 0); 11 k = 5 ? 1 : 0; // should be parsed k = (5 ? 1 : 0) 12 13 printf ("%d %d\n", j, k); 14 15 return j == 5 || k == 5; 16 } 17