|
error or warning during compilation, yet some function is generat ed: msg#00136lisp.clisp.general
Hi, I wonder about the following behaviour [21]> (lambda(s)(declare (compile))(ffi:with-foreign-string (f s :foo 1) (values f s))) ;NB: This form is erroneous. ERROR in :LAMBDA-2 : Constant :FOO cannot be bound. WARNING in LAMBDA : variable S is not used. Misspelled or missing IGNORE declaration? #<COMPILED-CLOSURE :LAMBDA> ; I.e. an error is reported, yet compilation continues, and returns a weird function object: [22]> (funcall *) NIL [23]> (disassemble **) Disassembly of function :LAMBDA 0 required arguments 0 optional arguments No rest parameter No keyword parameters 2 byte-code instructions: 0 (NIL) 1 (SKIP&RET 1) #<COMPILED-CLOSURE :LAMBDA> ;I.e. a function which takes no arguments(! -- where did S go?) and returns NIL. This behaviour is different from doing [24]> (defun foo (s) (ffi:with-foreign-string (f s :foo 1) (values f s))) FOO [25]> (compile *) ERROR in FOO-2 : Constant :FOO cannot be bound. WARNING in FOO : variable S is not used. Misspelled or missing IGNORE declaration? NIL ; 2 ; 1 No function was produced in this case, which I feel fine. Comments welcome, Jörg Höhle ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | multidimensional C-ARRAY: documentation differs from implementati on: 00136, Hoehle, Joerg-Cyril |
|---|---|
| Next by Date: | Re: error or warning during compilation, yet some function is generat ed: 00136, Sam Steingold |
| Previous by Thread: | multidimensional C-ARRAY: documentation differs from implementati oni: 00136, Hoehle, Joerg-Cyril |
| Next by Thread: | Re: error or warning during compilation, yet some function is generat ed: 00136, Sam Steingold |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |