Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#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:


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 14 years ago by Alan Post

Cc: alanpost@… added

comment:2 Changed 14 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

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

comment:3 Changed 13 years ago by felix winkelmann


Milestone 4.7.0 deleted

comment:4 Changed 12 years ago by felix winkelmann


Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.