Ticket #923 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Binding a name in the CL package

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

Description

Dan Weinreb 2008-11-24 13:41:13 EST Section 11.1.2.1.2 of the CL manual says that it's "undefined" what happens if you try to rebind a symbol in the CL package. SBCL complains if you try to do a macrolet on a CL symbol, such as "log" (which actually happened). I think it would be nice if this caused a compiler warning or error. (As you may know, I am hoping to eliminate the places where our CCL buildbot succeeds but the SBCL buildbot fails. Often SBCL explicitly outlaws things that are defined to be undefined by the satndard.)

Change History

comment:1 Changed 3 years ago by rme

I'm rather unenthusiastic about this.

SBCL's tendency to be pedantic is not really something that I'd like to see in CCL.

As I understand it, the rationale for the 11.1.2.1.2 is to prevent macro writers from losing when a macro using, say, the symbol cl:log, is expanded in an environment where cl:log has been rebound to something other than the standard function of that name. (This is where the macro hygiene people start smirking.)

comment:2 Changed 3 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.