]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - contrib/netbsd-tests/usr.bin/xlint/lint1/d_type_question_colon.c
MFC r305358,r305449,r305451,r306367,r306397,r309474:
[FreeBSD/stable/10.git] / contrib / netbsd-tests / usr.bin / xlint / lint1 / d_type_question_colon.c
1 /* the type of the ?: expression should be the more specific type */
2
3 struct foo {
4         int bar;
5 };
6
7 void
8 test(void) {
9         int i;
10         struct foo *ptr = 0;
11
12         for (i = (ptr ? ptr : (void *)0)->bar; i < 10; i++)
13                 test();
14 }