From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 30 May 2014 15:03:52 +0200 From: Julius Schmidt To: 9fans@9fans.net Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Subject: [9fans] Compiler bug Topicbox-Message-UUID: f3351392-ead8-11e9-9d60-3106f5b1d025 I have found what I believe to be a compiler bug: Comparing an int to a u16int causes the int to be cast to unsigned int, instead of the u16int being promoted to int and then compared (as I would argue the C89 standard specifies). As a result -1 < u is false for any u16int u. Or is this intended behaviour? I have verified that 8c exhibits the bug, but have not checked the other compilers. gcc does not seem to have this bug. Julius Schmidt