bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #40616] Unhygienic syntax-rules


From: Per Bothner
Subject: [Bug-kawa] [bug #40616] Unhygienic syntax-rules
Date: Mon, 18 Nov 2013 21:18:55 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.114 Safari/537.36

Update of bug #40616 (project kawa):

                  Status:                    None => Fixed                  
             Assigned to:                    None => bothner                
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

At first glance, I was afraid this would require major changes to fix. 
However, it looks like a fairly modest and "local" bug in a single function.

When we create a definition in a macro, the "scope" (ScopeExp) object used is
somewhat schizophrenic: the "real" scope used for optimization and code
generation vs the "name lookup" scope used during macro expansion and name
resolution.  The latter is a special temporary TemplateScope created when
expanding a syntax template.  We need to set up some special monkeying around
in that we create a special "alias declaration", so we can adjust it for the
real scopes for later compilation stages.

The logic for this worked when passing in an explicit TemplateScope (via the
nameSyntax parameter), but not when doing so implicitly - i.e. we had
previously set the current scope to a TemplateScope.

The fix is checked in, along with your testcase.  Thanks for the clean
testcase, and I'm embarrassed a simple bug like that lasted so long.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40616>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]