Opened 7 years ago

Closed 7 years ago

#929 closed defect (fixed)

Compiler should warn on #' (sharpsign single-quote) with undefined function

Reported by: fare Owned by: rme
Priority: normal Milestone:
Component: Compiler Version: trunk
Keywords: Cc: eschwartz@…

Description (last modified by gb)

Ethan H. Schwartz 2009-05-03 16:41:00 EDT

Observe:

Welcome to Clozure Common Lisp Version 1.3-dev-r11962-working-0711 
(LinuxX8664)!
? (defun foo1 () #'bar1)
FOO1
? (defun foo2 () #'common-lisp::bar2)
FOO2
? (defun foo3 () #'common-lisp:bar3)

> Error: Reader error: No external symbol named "BAR3" in package #<Package "COMMON-LISP"> .

Note that FOO1 and FOO2 will both error at runtime.  CCL should have warned
when defining those functions as well.

Change History (10)

comment:1 Changed 7 years ago by fare

This was ITA bug 59726.

comment:2 Changed 7 years ago by fare

Comment 1 Gail Zacharias 2009-05-14 07:48:35 EDT

Fixed in http://trac.clozure.com/openmcl/changeset/12053

comment:3 Changed 7 years ago by fare

Comment 2 Bill St. Clair 2009-06-02 10:32:06 EDT

Fixed in http://svn.internal.itasoftware.com/trac/changeset/279729

comment:4 Changed 7 years ago by fare

Comment 3 Ethan H. Schwartz 2011-06-24 10:38:48 EDT This has regressed, ironically, when safety > 2:

safety 3, bad:

Welcome to Clozure Common Lisp Version 1.6-r14832M (LinuxX8664)! ? (declaim (optimize (safety 3))) NIL ? (defun foo1 () #'bar1) FOO1

safety 2, good:

Welcome to Clozure Common Lisp Version 1.6-r14832M (LinuxX8664)! ? (declaim (optimize (safety 2))) NIL ? (defun foo1 () #'bar1) ;Compiler warnings : ; In FOO1: Undefined function BAR1 FOO1

comment:5 Changed 7 years ago by gb

  • Description modified (diff)
  • Summary changed from Reader should warn on #' (sharpsign single-quote) with undefined function to Compiler should warn on #' (sharpsign single-quote) with undefined function

comment:6 Changed 7 years ago by gb

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

(In [15282]) Check for undefined functions while processing (FUNCTION <symbol>), not while processing calls to a function used to implement that (those calls may be effectively NOTINLINE.)

Fixes ticket:929.

comment:7 Changed 7 years ago by eschwartz

  • Cc eschwartz@… added

I tried this on CCL 1.8-r15359M but it still doesn't warn. I expected the fix in r15282 would have been effective there...?

comment:8 Changed 7 years ago by rme

  • Component changed from IDE to Compiler
  • Resolution fixed deleted
  • Status changed from closed to reopened

r15282 hasn't been merged to the 1.8 release branch.

It looks like a small change. I'll take a look at it and see about merging it.

comment:9 Changed 7 years ago by rme

  • Owner set to rme
  • Status changed from reopened to new

comment:10 Changed 7 years ago by rme

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

(In [15406]) Merge r15282 from trunk. Closes ticket:929.

Note: See TracTickets for help on using tickets.