Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#295 closed defect (fixed)

Spurious warning at high safety

Reported by: gz Owned by: gz
Priority: trivial Milestone:
Component: Compiler Version:
Keywords: Cc:


Compiling a file containing:

(defun outer-fun ()
  (defun inner-fun () nil)

gives a warning (undefined function inner-fun) when compiled with (optimize (safety 3)) but not otherwise.

Change History (2)

comment:1 Changed 13 years ago by gz

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

fixed in r9354

comment:2 Changed 12 years ago by gb

Since the definition of INNER-FUNCTION isn't a toplevel form, I wouldn't be too upset if calls to it always warned (unless they were in the scope of an FTYPE declaration.)

It's not clear that this is significantly different from:

(defun outer-fun ()
  (when (oddp (random 2))
    (defun inner-fun () nil)))

The simpler original example also involves a conditional definition, since INNER-FUN will only be defined if OUTER-FUN has been executed. In:

(defun outer-fun (x)
  (defun inner-fun () x))


a warning on the call to INNER-FUN certainly seems justified.

Note: See TracTickets for help on using tickets.