Comment 0 for bug 309446

Revision history for this message
Nikodemus Siivola (nikodemus) wrote : Miscellaneous PCL deficiencies

  (reported by Alexey Dejneka sbcl-devel 2002-08-04)
  a. DEFCLASS does not inform the compiler about generated
     functions. Compiling a file with
       (DEFCLASS A-CLASS ()
         ((A-CLASS-X)))
       (DEFUN A-CLASS-X (A)
         (WITH-SLOTS (A-CLASS-X) A
           A-CLASS-X))
     results in a STYLE-WARNING:
       undefined-function
         SB-SLOT-ACCESSOR-NAME::|COMMON-LISP-USER A-CLASS-X slot READER|

     APD's fix for this was checked in to sbcl-0.7.6.20, but Pierre
     Mai points out that the declamation of functions is in fact
     incorrect in some cases (most notably for structure
     classes). This means that at present erroneous attempts to use
     WITH-SLOTS and the like on classes with metaclass STRUCTURE-CLASS
     won't get the corresponding STYLE-WARNING.

     [much later, in 2006-08] in fact it's no longer erroneous to use
     WITH-SLOTS on structure-classes. However, including :METACLASS
     STRUCTURE-CLASS in the class definition gives a whole bunch of
     function redefinition warnings, so we're still not good to close
     this bug...

  c. (fixed in 0.8.4.23)