From: Alex Smith Date: Tue, 7 Sep 2010 20:28:07 +0000 (+0100) Subject: Fix some bugs and nonportabilities pointed out by clang X-Git-Tag: 0.29~24 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=826a5106494611724a3613d5edcfab8db064a3a4;p=intercal.git Fix some bugs and nonportabilities pointed out by clang The build now works correctly under clang; usefully, it seems to make the intermittently-working permute test fail more reliably. It's always nice to get the opinion of a second compiler! --- diff --git a/src/abcess.h b/src/abcess.h index e1d0a35..e5dbb3f 100644 --- a/src/abcess.h +++ b/src/abcess.h @@ -27,7 +27,7 @@ typedef int_fast8_t bool; typedef int bool; # endif # else -typedef _Bool bool +typedef _Bool bool; # endif # define true 1 # define false 0 diff --git a/src/ick_bool.h b/src/ick_bool.h index 8430c8d..a9ec63c 100644 --- a/src/ick_bool.h +++ b/src/ick_bool.h @@ -18,7 +18,7 @@ typedef int_fast8_t bool; typedef int bool; # endif # else -typedef _Bool bool +typedef _Bool bool; # endif # define true 1 # define false 0 diff --git a/src/idiotism.oil b/src/idiotism.oil index 371eabf..61d9c0d 100644 --- a/src/idiotism.oil +++ b/src/idiotism.oil @@ -69,7 +69,7 @@ ; Reducing constants inside a C or operation can help to recognize idioms [cfoldintoorinand] -(((_1) | #{(x != x & x3)}2) & #{1}3)->(((_1) | #{x2 & x3}0) & _3) +(((_1) | #{(x != (x & x3))}2) & #{1}3)->(((_1) | #{x2 & x3}0) & _3) ; Binary bitwise optimizations [cbinand]