I'm not sure that I would take the description of CMU CL's error as "better": it doesn't explain at all why the result being an INTEGER is a problem; the fact that FOO-A returns an integer is only a problem because it is being used as the argument to CAR.
The source-path associated with the WARNING is the same as with the previous note, which then doesn't get repeated (documented at http:// www.sbcl. org/manual/ #The-Parts- of-a-Compiler- Diagnostic). You can see this if you muffle the note with
(declaim (muffle-conditions compiler-note))
at the top of the file.
I'm not sure that I would take the description of CMU CL's error as "better": it doesn't explain at all why the result being an INTEGER is a problem; the fact that FOO-A returns an integer is only a problem because it is being used as the argument to CAR.