Per CLHS 1.4.2, this example falls under "The consequences are undefined", meaning that if the implementation wants to signal a condition then it's welcome to, or if the system wants to play Angband instead (a classically #pragmatic gcc thing to do) then it's welcome to.

On Fri, Jan 17, 2014 at 3:54 PM, Douglas Katzman <> wrote:
COMMON-LISP-USER> (defstruct foo a b c)
COMMON-LISP-USER> (defstruct (kid (:include foo (b 5) (gaxr 'default))) a-new-slot)
COMMON-LISP-USER> (make-kid)

I got bitten by thinking that a derived structure type was properly changing the defaulting expression for a slot in the ancestor.
CLHS says of:
 (:include included-structure-name slot-description*)
Each slot-description must have a slot-name that is the same as that of some slot in the included structure.

CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
Sbcl-devel mailing list