Eric Blossom | 7 Jan 2005 03:25

compile-file apparently returning wrong value for error-p

Hi,

It appears that compile-file is incorrectly returning a value of T for
error-p even though the output diagnostics indicate that the
compilation produced only a warning.  [I'd also like to know how to
get rid of the warning...]

I'm using SBCL 0.8.17 on Linux 2.6.8 on x86 arch.

Suggestions?

Thanks,
Eric

----------------------------------------------------------------

[eb <at> bufo load]$ sbcl
This is SBCL 0.8.17, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
; loading system definition from
; #P"/usr/local/lib/sbcl/systems/sb-bsd-sockets.asd" into #<PACKAGE "ASDF3844">
; registering #<SYSTEM SB-BSD-SOCKETS {9D61439}> as SB-BSD-SOCKETS
; registering #<SYSTEM SB-BSD-SOCKETS-TESTS {92A7439}> as SB-BSD-SOCKETS-TESTS
; loading system definition from #P"/usr/local/lib/sbcl/systems/sb-posix.asd"
; into #<PACKAGE "ASDF4006">
(Continue reading)

Christophe Rhodes | 17 Jan 2005 20:47
Picon
Picon
Favicon

Re: compile-file apparently returning wrong value for error-p

[ delayed response... ]

Eric Blossom <eb <at> comsec.com> writes:

> It appears that compile-file is incorrectly returning a value of T for
> error-p even though the output diagnostics indicate that the
> compilation produced only a warning.  [I'd also like to know how to
> get rid of the warning...]

The correct value for errorp given a full warning /is/ T, I'm afraid.

> ; file: /home/eb/build/autod/load/test.lisp
> ; in: DEFUN FLATTEN-FORMAT
> ;     (CL-PPCRE:REGISTER-GROUPS-BIND (HEAD CH (#'PARSE-INTEGER REPEAT) TAIL)
> ;                                  ("(.*)(.)\\(([0-9]+)\\)(.*)" COBOL-FMT)
> ;                                  (CONCATENATE 'STRING
> ;                                               HEAD
> ;                                               (MAKE-STRING REPEAT
> ;                                                            :INITIAL-ELEMENT
> ;                                                            (CHAR CH 0))
> ;                                               TAIL))
> ; --> LET MULTIPLE-VALUE-BIND MULTIPLE-VALUE-CALL FUNCTION WHEN COND IF PROGN 
> ; --> LET* LET IF 
> ; ==>
> ;   NIL
> ; 
> ; caught WARNING:
> ;   The binding of ARRAY is not a STRING:
> ;     NIL
> ;   See also:
(Continue reading)

Eric Blossom | 17 Jan 2005 23:07

Re: compile-file apparently returning wrong value for error-p

On Mon, Jan 17, 2005 at 07:47:35PM +0000, Christophe Rhodes wrote:
> [ delayed response... ]
> 
> Eric Blossom <eb <at> comsec.com> writes:
> 
> > It appears that compile-file is incorrectly returning a value of T for
> > error-p even though the output diagnostics indicate that the
> > compilation produced only a warning.  [I'd also like to know how to
> > get rid of the warning...]
> 
> The correct value for errorp given a full warning /is/ T, I'm afraid.
> 

Thanks.

> I'm not intimately familiar with cl-ppcre, but what I think is
> happening is that register-groups-bind is binding CH to something like
> (if match (something with match) nil), and SBCL is warning you about
> the failure branch, which will cause a type mismatch if it's ever
> executed.  To quieten the system, probably a (check-type ch string) in
> the body will work.
> 
> Cheers,
> 
> Christophe

Thanks for the clarification and suggestions.

Eric

(Continue reading)


Gmane