Subject: Re: SBCL and STYLE-WARNING
From: rpw3@rpw3.org (Rob Warnock)
Date: Sat, 03 Mar 2007 04:39:56 -0600
Newsgroups: comp.lang.lisp
Message-ID: <veCdnacKG5nhzXTYnZ2dnUVZ_rmdnZ2d@speakeasy.net>
Alex Mizrahi <udodenko@users.sourceforge.net> wrote:
+---------------
| (message (Hello 'Philippe)
| (you :wrote  :on '(03 Mar 2007 09:11:20 GMT))
|  ??>> I presume you mean you took care of _defining_ functions before
|  ??>> referencing them?
|  ??>>
|  PM> Right.
| 
| how?
| double-p is defined at bottom of file, while referenced in
| compare-hands in  the top of the file, so warning is perfectly legal.
| 
| LOAD basically just executes forms in order, as they were typed in 
| top-level, so it cannot guess that form is defined somewhere later
| in a file.
+---------------

I sometimes run into this with CMUCL "scripts" or when compiling
functions that reference functions compiled separately in other files.
My usual solution to shut up CMUCL is to simply declare the names
as otherwise-unspecified functions, e.g.:

    ;;; Shut up fwd-ref warnings:
    (declaim (ftype function mmap r8 r16 r32 w8 w16 w32 d32 dump32
			     memcpy memcmp spin-until-change))


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607