bogus warnings from constant-folding
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Invalid
|
Low
|
Unassigned |
Bug Description
The compiler sometimes tries to constant-fold expressions before
it checks to see whether they can be reached. This can lead to
bogus warnings about errors in the constant folding, e.g. in code
like
(WHEN X
(WRITE-STRING (> X 0) "+" "0"))
compiled in a context where the compiler can prove that X is NIL,
and the compiler complains that (> X 0) causes a type error because
NIL isn't a valid argument to #'>. Until sbcl-0.7.4.10 or so this
caused a full WARNING, which made the bug really annoying because then
COMPILE and COMPILE-FILE returned FAILURE-P=T for perfectly legal
code. Since then the warning has been downgraded to STYLE-WARNING,
so it's still a bug but at least it's a little less annoying.
Changed in sbcl: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Can no longer reproduce.