I've reformatted your code to Lisp standard style (2 spaces instead of tabs, no parens on their own lines) for better readability.
(define strange-warning (lambda (sym options)
(let ((el (assq sym options)))
(if (pair? el)
(if (list? el)
"list"
(cdr el)) ; <== strange warning here
"found nothing"))))
While this code is hard to understand, the warning is incorrect. In particular, if el => (a . b), then it is a pair but not a list, and the (cdr el) branch will be taken correctly, returning b. This is a minor compiler bug on at least two levels: no warning should be produced, and the reference to "false" is incorrect. You should file a bug at
bugs.callcc.org.
I would say that discriminating between pairs and lists this way is a bad idea: you should always use lists with a car that distinguishes the two types of values you want to treat differently. In particular, pair? is O(1) whereas list? is O(n) in the length of the list. There's such a thing as carrying dynamic typing too far.
(define no-warning (lambda (sym options)
(let ((el (assq sym options)))
(if (list? el)
"list"
(if (pair? el)
(cdr el) ; <== no warning here
"found nothing")))))
No warning is to be expected. Again, if el => (a . b), it will fail the list? test but pass the pair? test, and taking its cdr will produce b. However, this code is *not* semantically identical with strange-warning. If el is (), then it is a list but not a pair, and this procedure will return "list", whereas strange-warning will return "found nothing".
(define also-no-warning (lambda (sym options)
(define el (assq sym options))
(if (pair? el)
(if (list? el)
"list"
(cdr el)) ; <== also no warning here
"found nothing")))
Again, no warning is to be expected. The fact that strange-warning triggers a warning but also-no-warning does not is very mysterious.