Some consistency changes to library & headers flags.
[splint-patched.git] / test / condifomit.c
blobc2fb1420f70963045221356fae82c20e3dfbc3f3
1 /* Contributed by Peteran, 12 Jan 2004 */
2 /* GCC extension: Conditionals with Omitted Operands
3 "x ? : y" is same as x ? x : y
4 http://gcc.gnu.org/onlinedocs/gcc-3.3.2/gcc/Conditionals.html#Conditionals
5 */
7 /*@+boolint -exportlocal@*/
8 void cond1(void *testme)
10 int i,j;
11 i = (testme!=0)? : 0;
12 j = (testme!=0)? (testme!=0): 0;
15 int cond2(void *testme)
17 return (testme!=0)? : 0;
20 int cond3(int testme)
22 return testme? testme: 0;
25 void test_use_before_definition() {
26 int i;
27 printf("%d\n", i?:0);