Article View: comp.lang.lisp.mcl
Article #744call-next-method
From: karsten poeck
Date: Tue, 12 Jan 1993 10:43
Date: Tue, 12 Jan 1993 10:43
47 lines
1683 bytes
1683 bytes
Is it really correct if a compiler warns in the following code (defclass test () () ) (defmethod testmethod ((ich test) foo) (print foo)) (defclass test-1 (test) ()) (defmethod testmethod ((ich test-1) foo) (call-next-method)) (testmethod (make-instance 'test-1) 4) with ;Compiler warnings : ; Unused lexical variable Foo, in Testmethod. since foo is actually used in testmethod ((ich test) foo) because of the call-next-method? My problem is that Macintosh Common Lisp 2.0 warns but Allegro Cl/PC 1.0 does not and I have to exchange code between the two platforms. Even worse, if I change testmethod ((ich test-1) foo) to (defmethod testmethod ((ich test-1) foo) (declare (ignore foo)) (call-next-method)) Macintosh Common Lisp 2.0 is satisfied but Allegro Cl/PC 1.0 complains that foo is actually used and not ignored, so I have to write (defmethod testmethod ((ich test-1) foo) #+:ccl-2 (declare (ignore foo)) (call-next-method)) what is quite annoying, since this code is really not platform-dependent Karsten Karsten Poeck Universitaet Wuerzburg Lehrstuhl fuer Informatik VI
Technical Details
Message-ID:
<poeck-120193114641@wina65.informatik.uni-wuerzburg.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!howland.reston.ans.net!spool.mu.edu!yale.edu!ira.uka.de!fauern!dec16!wina65.informatik.uni-wuerzburg.de!userShow Full Headers
Complete Article Headers
Newsgroups: comp.lang.lisp.mcl Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!howland.reston.ans.net!spool.mu.edu!yale.edu!ira.uka.de!fauern!dec16!wina65.informatik.uni-wuerzburg.de!user From: poeck@informatik.uni-wuerzburg.de (karsten poeck) Subject: call-next-method Message-ID: <poeck-120193114641@wina65.informatik.uni-wuerzburg.de> Followup-To: comp.lang.clos Sender: news@informatik.uni-wuerzburg.de (USENET News account) Organization: university of wuerzburg Date: Tue, 12 Jan 1993 10:43:58 GMT Lines: 47