From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Wed, 2 Jan 2013 10:07:00 -0500 To: cinap_lenrek@gmx.de, 9fans@9fans.net Message-ID: <734e9cdeca178a978ff5692bf1efa5b2@brasstown.quanstro.net> In-Reply-To: <1306b366fc14378754e4d10a993cce67@rei2.9hal> References: <1306b366fc14378754e4d10a993cce67@rei2.9hal> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] arm compiler bug Topicbox-Message-UUID: fb5d7f88-ead7-11e9-9d60-3106f5b1d025 On Wed Jan 2 04:07:28 EST 2013, cinap_lenrek@gmx.de wrote: > 0 < -0x80000000 == 1 with 5c. i get the same results for all compilers: 0 < -0x80000000......yes 1 == -0x80000000......no 0 < -0x80000000 == 1......yes for [568]c. the last one is correct since the order of operations are (0 < -0x80000000) == 1 which is clearly true. - erik #include #include void yesno(char *s, int bool) { print("%s...", s); if(bool) print("yes\n"); else print("no\n"); } void main(void) { yesno("0 < -0x80000000...", 0 < -0x80000000); yesno("1 == -0x80000000...", 1 == -0x80000000); yesno("0 < -0x80000000 == 1...", 0 < -0x80000000 == 1); exits(""); }