[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] ANSI compliance errors with CONCATENATE
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] ANSI compliance errors with CONCATENATE |
Date: |
21 Sep 2002 19:14:21 -0400 |
Greetings! I'm checking in a fix for these as well. Please verify.
Regarding the last, I may need some advice. The compiler uses
(make-sequence 'vector ...), which gets promoted to (make-sequence
'(array * (*)) ...) by normalize type. So this has got to work unless
we want to make signiicant changes. This is interpreted as a simple
one-dimensional array of objects. The spec, though, says that
(make-sequence '(vector * (3)) ...) should throw an error, as makes
sense. So basically I just triggered an error if the size of an array
type was specified:
(unless (and (or (eq (car type) 'array)
(eq (car type) 'simple-array))
(not (si::fixnump (car (caddr type)))))
(error "~S is not a sequence type." type))
Take care,
"Paul F. Dietz" <address@hidden> writes:
> The following forms are evaluated improperly in gcl
> compiled with --enable-ansi:
>
> (concatenate 'cons '(a b c d e))
> ;; should yield (a b c d e), but instead throws an error.
> ;; (CONS is a subtype of LIST, so this should be legal.)
>
> (concatenate 'null () ())
> ;; should yield NIL (since NIL is in type NULL and NULL
> ;; is a subtype of LIST) but instead throws an error.
>
> (concatenate '(vector * 3) '(a b c d e))
> ;; should throw an error (since the number of elements is
> ;; incompatible) but instead returns (a b c d e).
>
> Paul
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah