#459 closed defect (fixed)
-picky shouldn't warn when other path also returns an undefined value?
| Reported by: | Alan Post | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 4.9.0 |
| Component: | compiler | Version: | 4.6.x |
| Keywords: | Cc: | alanpost@… | |
| Estimated difficulty: |
Description
I'm not sure this issue can be fixed, but here it goes:
The following code:
(define (foo) (if condition (for-each (lambda x x) '(0 1 2))))
when compiled with '-picky', gives the following warning:
Warning: in toplevel procedure `foo': conditional in tail-position has branch with undefined result: (if condition (let (... ...) (let ... ...)) (##core#undefined))
However, the other branch *also* returns an undefined result, making this particular warning a no-op in this case.
I would expect to not see this error when both branches return the same result.
Is this condition detectable?
Change History (4)
comment:1 Changed 15 years ago by
| Cc: | alanpost@… added |
|---|
comment:2 Changed 15 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note: See
TracTickets for help on using
tickets.

-picky has been removed. This can not be solved without interprocedural flow analysis.