[cmucl-help] Re: Spurious compilation diagnostic?

2008-09-22 Thread Steven Edwards

Thank you for your contribution.

Yes, it's (speed 3) (safety 0)

No, I haven't explicitly loaded any streams packages or anything  
else.  I'm just using what's supplied by default.


I'm not calling stream-read-char directly in my code, only read-char  
(and unread-char).


I'm using cmucl mostly as one of a couple of Lisps for compatibility  
testing.  Most development is done with clisp; once a day or so I run  
the source through cmucl and gcl to see what strangeness might be  
detected.  My source must be easily ported because the intent is to be  
able to distribute it to neophyte Lispers whose choice of CL  
implementation may vary.


My project is a new version of the old and decrepit Chess In Lisp  
Toolkit.  It's about 12 K lines long now and some code snippets can be  
found at: http://64.68.157.89/forum/viewtopic.php?t=23123



On Sep 22, 2008, at 9:44 AM, Raymond Toy wrote:


Steven Edwards wrote:

Greetings, list readers:

Banner:

CMU Common Lisp 19e (19E), running on gail
With core: /Users/sje/cmucl-19e-x86-darwin/lib/cmucl/lib/lisp.core
Dumped on: Thu, 2008-05-01 20:38:02-04:00 on macmini
See  for support information.
Loaded subsystems:
   Python 1.1, target Intel x86
   CLOS based on Gerd's PCL 2004/04/14 03:32:47


User source (wrapper for read-char):

(defun read-ch (my-stream)
 "Return the next character on an input stream; return nil on end of
stream."
 (read-char my-stream nil nil))


Compilation warning output:

; In: DEFUN READ-CH

;   (READ-CHAR MY-STREAM NIL NIL)
; --> BLOCK LET LISP::STREAM-DISPATCH ETYPECASE LET COND IF COND IF  
COND IF

; --> PROGN LET
; ==>
;   (STREAM-READ-CHAR STREAM)
; Warning: Undefined function STREAM-READ-CHAR



Is the above a spurious compilation diagnostic?  The user function  
works

fine.


Are you compiling this with speed 3 and space 0?  You didn't say.   
With

those settings, I get the compiler warnings.

They're real warnings because stream-read-char isn't defined because
that's for Gray streams, which, apparently, you haven't loaded.

I also get a warning about stream::%read-char.  That's for
simple-streams, which you apparently haven't loaded either.

Without either of these modules loaded, you can't create streams of  
that
type, so you can never execute that part of the code that would use  
the

undefined functions.  So, I guess they are spurious warnings.

Ray








[cmucl-help] Re: Spurious compilation diagnostic?

2008-09-22 Thread Raymond Toy
Steven Edwards wrote:
> Greetings, list readers:
> 
> Banner:
> 
> CMU Common Lisp 19e (19E), running on gail
> With core: /Users/sje/cmucl-19e-x86-darwin/lib/cmucl/lib/lisp.core
> Dumped on: Thu, 2008-05-01 20:38:02-04:00 on macmini
> See  for support information.
> Loaded subsystems:
> Python 1.1, target Intel x86
> CLOS based on Gerd's PCL 2004/04/14 03:32:47
> 
> 
> User source (wrapper for read-char):
> 
> (defun read-ch (my-stream)
>   "Return the next character on an input stream; return nil on end of
> stream."
>   (read-char my-stream nil nil))
> 
> 
> Compilation warning output:
> 
> ; In: DEFUN READ-CH
> 
> ;   (READ-CHAR MY-STREAM NIL NIL)
> ; --> BLOCK LET LISP::STREAM-DISPATCH ETYPECASE LET COND IF COND IF COND IF
> ; --> PROGN LET
> ; ==>
> ;   (STREAM-READ-CHAR STREAM)
> ; Warning: Undefined function STREAM-READ-CHAR
> 
> 
> 
> Is the above a spurious compilation diagnostic?  The user function works
> fine.

Are you compiling this with speed 3 and space 0?  You didn't say.  With
those settings, I get the compiler warnings.

They're real warnings because stream-read-char isn't defined because
that's for Gray streams, which, apparently, you haven't loaded.

I also get a warning about stream::%read-char.  That's for
simple-streams, which you apparently haven't loaded either.

Without either of these modules loaded, you can't create streams of that
type, so you can never execute that part of the code that would use the
undefined functions.  So, I guess they are spurious warnings.

Ray