symbol-macros and dynamic-extent, special declarations

Bug #310225 reported by Tobias C. Rittweiler
2
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Low
Unassigned

Bug Description

The following should signal a continuable error:

  (define-symbol-macro .foo. 42)
  (declaim (special .foo.))

See the CLHS entry for DEFINE-SYMBOL-MACRO. (Continuable for convenience.)

Furthermore, a test should be added to the test suite that checks that

   (symbol-macrolet ((.x. 42))
     (declare (dynamic-extent .x.))
     nil)

results in an error. (It does result in an error, but the test suite
should explicitly check for it.)

[define-symbol-macro] -

   http://www.lispworks.com/documentation/HyperSpec/Body/m_defi_1.htm#define-symbol-macro

[symbol-macrolet] -

  http://www.lispworks.com/documentation/HyperSpec/Body/s_symbol.htm#symbol-macrolet

[dynamic-extent] -

  http://www.lispworks.com/documentation/HyperSpec/Body/d_dynami.htm#dynamic-extent

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

Unspecified behaviour, so yes, an error would be good.

Changed in sbcl:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Douglas Katzman (dougk) wrote :

Tried it just now and got:

debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "main thread" RUNNING {7F2121DC8103}>:
  Cannot proclaim a MACRO variable SPECIAL: .FOO.

I would call it fixed.

Changed in sbcl:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.