[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FLET and the INLINE declaration

    Date: Mon, 4 Feb 85 14:20 EST
    From: Charles Hornig <Hornig@SCRC-STONY-BROOK>

    ....This is a good idea except for one problem: where do you put the
    declaration?  FLET and LABELS do not allow you to put declarations
    before their bodies.  Perhaps this is a language bug.

    (flet ((plus1 (x) (1+ x)))
       (declare (inline plus1))	 ;; This declare is illegal in the CLM
       (list (plus1 1) (plus1 2)))

You have to say

    (flet ((plus1 (x) (1+ x)))
       (locally (declare (inline plus1))
	 (list (plus1 1) (plus1 2))))

I think this is a language bug and declarations, other than declarations
of variable bindings, should have been allowed at this position in FLET,
LABELS, and MACROLET.  Does anyone else have an opinion?