[Top][All Lists]

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

[Gcl-devel] (random tester) Duplicate case values

From: Paul F. Dietz
Subject: [Gcl-devel] (random tester) Duplicate case values
Date: Wed, 12 Nov 2003 05:59:20 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

The random tester threw out this error.  Apparently duplicate case
values (which are legal in lisp) can lead to illegal C code (where
they are not) if the compiler can determine (by type information)
that the case form can be compiled directly into a switch.  This test
shows examples of a key duplicated in the same key list and between
ifferent key lists.  See test misc.163, which is also show below:

  (compile nil
           '(lambda (b)
              (declare (type (integer -15716 3947) b))
              (case b
                ((-7 -6 -6) :good)
                ((-5 -6) :bad)


Compiling gazonk19.lsp.
End of Pass 1.
End of Pass 2.
gazonk19.c: In function `L1':
gazonk19.c:5224: duplicate case value
gazonk19.c:5221: previously used here
gazonk19.c:5233: duplicate case value
gazonk19.c:5224: previously used here
(SYSTEM "(cd . ;gcc -c -Wall -DVOL=volatile -fsigned-char -fwritable-strings -pipe  
-I/home/dietz/lib/gcl-2.7.0/unixport/../h  -O3 -fomit-frame-pointer -c gazonk19.c 
-w)") returned a non-zero value 0.

Fast links are on: do (use-fast-links nil) for debugging
Broken at UNLESS.  Type :H for Help.


reply via email to

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