Skip to content

Fixing issue #803#804

Merged
marcoeilers merged 5 commits into
masterfrom
meilers_fix_803
Jun 25, 2024
Merged

Fixing issue #803#804
marcoeilers merged 5 commits into
masterfrom
meilers_fix_803

Conversation

@marcoeilers

Copy link
Copy Markdown
Contributor

Fixing issue #803. The issue is that the macro expansion code that decides whether a variable has to be renamed because it clashes with a variable declared at the macro usage site sometimes claims that that variable names are used that actually aren't.

In particular, the code

  • checks which names are declared at the macro call site in the original program
  • separately keeps track of variable names that are declared at the macro call site as a result of previous macro expansions.

That second step doesn't always work correctly, since there is a single set that keeps track of which names are added because of macro expansion. As a result, variable names that are added in one place as a result of a macro expansion count as used even in different scopes.

This PR fixes that by tracking which names are added per scope.

@marcoeilers marcoeilers requested a review from JonasAlaif June 12, 2024 17:45
@marcoeilers marcoeilers merged commit aa72715 into master Jun 25, 2024
@marcoeilers marcoeilers deleted the meilers_fix_803 branch June 25, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant