]> andersk Git - splint.git/blobdiff - test/tests2.2/boolops.c
Added support for ISO C99 _Bool and stdbool bool/true/false. The
[splint.git] / test / tests2.2 / boolops.c
index 1a21de030fbedbb628852d411e32014c0c389fa1..aa8709045be3e203eb8b40e08a85fbe251f0b606 100644 (file)
@@ -1,21 +1,21 @@
 /*@-booltype Kzam@*/
 typedef int Kzam;
 
-enum { TRUE, FALSE } ;
+enum { true, false } ; /* changed to be consistent with ISO true/false */
 
 int main() {
-  Kzam b = TRUE;
+  Kzam b = true;
   Kzam b1 = b;
 
-  b = TRUE;
+  b = true;
   b = b1;
   b = 12; /* Assignment of int to Kzam: b = 12 */
 
-  b = TRUE && FALSE;
-  b = b && FALSE;
-  b = FALSE && b;
+  b = true && false;
+  b = b && false;
+  b = false && b;
 
-  if ((b && FALSE) == 0)
+  if ((b && false) == 0)
     return(0);
   return(0);
 }
This page took 0.574509 seconds and 4 git commands to generate.