Ticket #927 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

If a symbol-macrolet defines the same symbol twice, the compiler should complain

Reported by: fare Owned by:
Priority: normal Milestone:
Component: Compiler Version: trunk
Keywords: Cc:

Description

Dan Weinreb 2009-01-09 10:59:52 EST We had trouble in a place where a macro of ours expanded into a symbol-macrolet with several clauses, two of which defined the very same symbol. See our Buzilla

 http://svn.internal.itasoftware.com/trac/changeset/238504

I don't actually see anywhere in the HyperSpec? that says this is illegal, although it also does not say what it would do (which symbol "wins"?).

SBCL flags it as an error.

For the time being, Fare has fixed that macro to check for that error manually.

[NB: ITA Bug 53168]

Change History

comment:1 Changed 2 years ago by gb

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

(In [15314]) Warn (via full warning) on duplicate bindings in SYMBOL-MACROLET, MACROLET, FLET, LABELS (fixes ticket:927.)

If a DECLARE expression is encountered when a form is expected, make the error message more verbose (and mention macroexpansion as a possible cause of the problem.) Fixes ticket:926.

Warn (via a full warning) if a local function shadows a global CL function name. Fixes ticket:923.

If STYLE-WARNINGs are incidentally signaled during (e.g.) macroexpansion and are handled and postprocessed by the compiler, ensure that the warning actually generated will be a STYLE-WARNING.

Note: See TracTickets for help on using tickets.