Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issue #803 #804

Merged
merged 5 commits into from
Jun 25, 2024
Merged

Fixing issue #803 #804

merged 5 commits into from
Jun 25, 2024

Conversation

marcoeilers
Copy link
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 merged commit aa72715 into master Jun 25, 2024
5 checks passed
@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