Opened 8 years ago

Closed 7 years ago

#933 closed defect (fixed)

Issue with format and user-defined format functions

Reported by: hans Owned by:
Priority: normal Milestone:
Component: ANSI CL Compliance Version: trunk
Keywords: Cc:

Description (last modified by gb)

When using user-defined format functions and ~:*, CCL fails to interpret the format string correctly:

(defun cl-user::x (stream value a b)
  (declare (ignore a b))
  (format stream "[~A]" value))

(defun x ()
  (format nil "~/X/~:*~/X/" 1))

yields, while compiling:

;   In X: Target position for ~* out of bounds in format string:
;   "~:*~/X/~%"
;      ^

and generates a runtime error.

Change History (2)

comment:1 Changed 8 years ago by gb

  • Description modified (diff)

comment:2 Changed 7 years ago by gb

  • Resolution set to fixed
  • Status changed from new to closed

(In [15618]) In OPTIMIZE-FORMAT-CALL, punt if the prefix/suffix of the format string contains a #\~. (May be a control directive.) Fixes ticket:933 in the trunk.

Note: See TracTickets for help on using tickets.