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

Can I declare ignore a global?



I tried to compile a Clos benchmark from Ken Anderson in MCL and run into
the following problem. When I define a global variable <the global> and a
function that has <the global> as a parameter I cannot do (declare (ignore
<the global>)).

Test code follows. 

Is this a bug in MCL 2.0.1 or is the declaration illegal?

Karsten


(defvar dummy-global)

(defun test (dummy-global)
  (declare (ignore dummy-global))
  1)

#|
? 
;Compiler warnings :
;   Variable DUMMY-GLOBAL not ignored, in TEST.
TEST

|#
#|
(disassemble #'test)

->

0 (JSR_SUBPRIM $SP-ONE-ARG-VPUSH)
4 (MOVE.L @VSP D0)
6 (MOVE.L '#<DUMMY-GLOBAL Symbol Value Locative> ATEMP0)
12 (JSR_SUBPRIM $SP-DBIND)
16 (MOVEQ (FIXNUM 1) D0)
18 (JMP_SUBPRIM $SP-LFRETPAYBACK1)

|#

 Karsten A. Poeck, Lehrstuhl fuer Informatik VI, Universitaet Wuerzburg
 Allesgrundweg 12, 97218 Gerbrunn, Germany
 E-mail: poeck@informatik.uni-wuerzburg.de
 Tel ++ 49  931 70561 18, Fax ++ 49 931 70561 20
 http://wi6a76.informatik.uni-wuerzburg.de/HTMLs/ls6-info/Assis/poeck/poeck.html