gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] a few bugs


From: Peter Wood
Subject: [Gcl-devel] a few bugs
Date: Sun, 27 Feb 2005 10:29:55 +0100
User-agent: Mutt/1.4.2.1i

Hi

With CVS gcl (yesterday) and gcl-2.6.6, on X86 linux-2.6.10:

Bug1:

A defpackage bug?

(defpackage ok (:import-from :common-lisp t))

==> #<"OK" package>

(defpackage notok (:import-from :common-lisp nil))

==> Error in SPECIFIC-CORRECTABLE-ERROR [or a callee]: 

Fast links are on: do (use-fast-links nil) for debugging
Broken at SPECIFIC-CORRECTABLE-ERROR.  Type :H for Help.
 1 (Continue) 
 2 Return to top level.
dbl:NOTOK>>

(macroexpand '(defpackage notok (:import-from :common-lisp nil)))

(EVAL-WHEN (LOAD EVAL COMPILE)
  (IF (FIND-PACKAGE "NOTOK") (PROGN (RENAME-PACKAGE "NOTOK" "NOTOK"))
      (MAKE-PACKAGE "NOTOK" ':USE 'NIL ':NICKNAMES 'NIL))
  (SETF (GET ':NOTOK 'SYSTEM::PACKAGE-DOCUMENTATION) NIL)
  (LET ((*PACKAGE* (FIND-PACKAGE "NOTOK")))
    (USE-PACKAGE '"LISP")
    (IMPORT (MAPCAR #'(LAMBDA (SYMBOL)
                        (IF (FIND-SYMBOL SYMBOL "COMMON-LISP")
                            (INTERN SYMBOL "COMMON-LISP")
                            (SPECIFIC-CORRECTABLE-ERROR :PACKAGE-ERROR
                                "" "COMMON-LISP"
                                (FORMAT NIL "Symbol ~S not present~%"
                                        SYMBOL))))
                    '("NIL"))))
  (FIND-PACKAGE "NOTOK"))
T

#'find-symbol returns the symbol NIL as its first return value since
it's found "NIL", but this is causes the error to trigger.  If the
purpose is to test wether the symbol is present I think defpackage
should be checking both return values of #'find-symbol since they are
guaranteed to both be nil if the symbol is not found. 

Bug 2:

:q in the debugger no longer quits to the top level, but the
information displayed by ':help' does not reflect this.

Bug 3:

I am not sure what specific-correctable-error is supposed to do, but I
think its broken in CVS gcl.  This is what happens when I use it in
gcl-2.6.6, (presumably this is correct for gcl).

>(multiple-value-setq (x error) (ignore-errors (specific-correctable-error 
>:package-error "" "foo" "description")))

NIL

>error

#<CONDITIONS::INTERNAL-PACKAGE-ERROR.1>

But in CVS gcl:

>(multiple-value-setq (x error) (ignore-errors (specific-correctable-error 
>:package-error "" "foo" "description")))

NIL

>error

#<CONDITIONS::INTERNAL-SIMPLE-ERROR.0>

Regards,
Peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]