[LLVMdev] Fwd: Tiny bug in Kaleidoscope sample (FALSE ALARM)
Mikael Lyngvig
mikael at lyngvig.org
Sun May 13 18:04:48 PDT 2012
Nope, it seems that the code is correct after all. Perhaps a bit unclear,
but correct. So shame on me!
Cheers,
Mikael
---------- Forwarded message ----------
From: Mikael Lyngvig <mikael at lyngvig.org>
Date: 2012/5/14
Subject: Tiny bug in Kaleidoscope sample
To: llvmdev at cs.uiuc.edu
Hi,
As far as I can tell, there's a tiny error in the sample code for the
Kaleidoscope interpreter, which is part of the Tutorial:
1. The function GetTokPrecedence() returns -1 on error (i.e. if the
input character is a character value above 127).
2. The caller of GetTokPrecedence() never checks for this so if the
input character is an 8-bit character, it is treated as a valid binary
operator.
I know this won't make the planet explode and that mankind will possibly
survive another 200 years despite this bug, but I thought you'd want to
know.
Cheers,
Mikael Lyngvig
--
-- Earth is a soddy place. Stay away!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120514/d03e5581/attachment.html>
More information about the llvm-dev
mailing list