From: Julius Schmidt <aiju@phicode.de>
To: 9fans@9fans.net
Subject: [9fans] Compiler bug
Date: Fri, 30 May 2014 15:03:52 +0200 [thread overview]
Message-ID: <alpine.LNX.2.00.1405301457450.6583@localhost> (raw)
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
next reply other threads:[~2014-05-30 13:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 13:03 Julius Schmidt [this message]
2014-05-30 14:56 ` Charles Forsyth
-- strict thread matches above, loose matches on Subject: below --
2001-07-14 5:39 [9fans] compiler bug David Gordon Hogan
2001-07-14 7:52 ` Mike Haertel
2001-07-12 13:19 forsyth
2001-07-12 10:33 forsyth
2001-07-12 6:27 Mike Haertel
2001-07-12 10:21 ` Boyd Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.00.1405301457450.6583@localhost \
--to=aiju@phicode.de \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).