Custom Query (1030 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (934 - 936 of 1030)

Ticket Resolution Summary Owner Reporter
#240 invalid setf expander not macroexpanded Gary Byers Hans Hübner
Description

I'm trying to define a setf expander that itself is a macro which uses other macros. This does not work:

(in-package :cl-user)

(defvar *foo* 0)

(defmacro foo () '*foo*) (defmacro set-foo (new) `(setf *foo* ,new))

(defmacro set-bar (new)

(set-foo new))

(defsetf foo set-bar)

(incf (foo))

; The error is ; value #:G25 is not of the expected type NUMBER. ; The expansion of the (incf (foo)) form is ; (LET* ((#:G1 1) (#:G0 (+ (FOO) #:G1))) (SET-BAR #:G0))

#272 invalid (coerce (/ pi 2) 'single-float) incorrect Gary Byers gz
Description
? (/ pi 2)
1.5707963267948966D0
? (coerce * 'single-float)
1.5707964
? 
#299 invalid CCL does not resolve forward-referenced accessors defined by defstruct in the same compilation unit Gary Byers Hans Hübner
Description

When compiling a file that uses a setf accessor defined by defstruct before the defstruct is seen, CCL fails to resolve the reference.

hertha 322_> cat foo.lisp
(defpackage "FOO" (:use "CL"))

(in-package "FOO")

(defun test ()
  (let ((tpl (make-template :mode 1)))
    (setf (template-mode tpl) 2)
    (template-mode tpl)))

(defstruct template mode)

hertha 323_> ccl -n
Welcome to Clozure Common Lisp Version 1.2-r9260M-trunk  (DarwinPPC32)!
? (load (compile-file "foo.lisp"))
;Compiler warnings for "/private/tmp/foo.lisp" :
;   In FOO::TEST: Undefined function SETF::|FOO::TEMPLATE-MODE|
#P"/private/tmp/foo.dfsl"
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.