Wanted: signal at least a STYLE-WARNING for #1()

Bug #1252100 reported by Jean-Philippe Paradis on 2013-11-17
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

What I do:

What happens:
#(NIL) is returned.

What I expected to happen:
At least a STYLE-WARNING, if not a WARNING or ERROR.


CLHS Sharpsign Left-Parenthesis (http://www.lispworks.com/documentation/HyperSpec/Body/02_dhc.htm) states:

"The consequences are undefined if the unsigned decimal integer is non-zero and number of objects supplied before the closing ) is zero."

SBCL is not necessarily wrong in returning the above result, however code that relies on this behavior is not portable and thus I think at least a STYLE-WARNING should be signaled as a portability aid.

SBCL version:

uname -a:
Linux dynamorph 3.2.0-56-generic-pae #86-Ubuntu SMP Wed Oct 23 17:51:27 UTC 2013 i686 i686 i386 GNU/Linux


Douglas Katzman (dougk) wrote :

ABCL and ECL implement SBCL's current behavior, but it definitely seems an improvement to signal a reader-error.
CLISP does, and CCL gets itself into an error more-or-less by accident, speaking of the unportability of the syntax.

Plus I think we need more reasons to use Latin -

* (read-from-string "#9()")
debugger invoked on a SB-INT:SIMPLE-READER-ERROR in thread
#<THREAD "main thread" RUNNING {1002C052B3}>:
  Ex Nihilo Nihil - can't initialize length 9 vector from NIL.

How's that?

Douglas Katzman (dougk) wrote :

commit 1387a7fce24788d85bfcdced9321d8a22de5d4e2

Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers