I was debugging in gdb when I came across this oddity:
(gdb)
107 newIterationRequired = infoAvailableUntil+1 < sqrt(input)+1 && isPrime ? TRUE : FALSE;
(gdb)
107 newIterationRequired = infoAvailableUntil+1 < sqrt(input)+1 && isPrime ? TRUE : FALSE;
(gdb) print infoAvailableUntil+1 < sqrt(input)+1 && isPrime ? TRUE : FALSE
$11 = FALSE
(gdb) s
108 if (newIterationRequired)
(gdb) print newIterationRequired
$13 = TRUE
newIterationRequired
's type is an enum that mimics boolean behavior from C++:
typedef enum { FALSE, TRUE } bool;
How is this possible?