Mikael Lyngvig
2012-May-14 01:04 UTC
[LLVMdev] Fwd: Tiny bug in Kaleidoscope sample (FALSE ALARM)
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>
Reasonably Related Threads
- [LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)
- [LLVMdev] Minor correction to the Visual Studio documentation/Windows support in general
- [LLVMdev] "Broken" link in Kaleidoscope sample
- [LLVMdev] Linking clang.exe takes more than two hours?
- [LLVMdev] "Mapping High-Level Constructs to LLVM IR" Github URL
