Ticket #933 (closed defect: fixed)

Opened 2 years ago

Last modified 19 months ago

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) (diff)

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

comment:1 Changed 2 years ago by gb

  • Description modified (diff)

comment:2 Changed 19 months ago by gb

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

(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.