bogus warnings from constant-folding

Bug #309451 reported by Nikodemus Siivola
2
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.

Tags: compiler
Changed in sbcl:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Stas Boukarev (stassats) wrote :

Can no longer reproduce.

Changed in sbcl:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.