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

Fix nested pre-processor blocks #405

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

albertziegenhagel
Copy link
Contributor

In the pre-processor code, when we check whether a #define or #include statement should be evaluated, only the top of the pre-processor stack was taken into account. This commit changes it so that all the previously taken branches need to evaluate to true.

Fixes #404.

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.24%. Comparing base (81a33a1) to head (7c24d0c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #405   +/-   ##
=======================================
  Coverage   88.23%   88.24%           
=======================================
  Files          35       35           
  Lines        4795     4796    +1     
=======================================
+ Hits         4231     4232    +1     
  Misses        564      564           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@gnikit gnikit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT! Thanks for the PR @albertziegenhagel.

@gnikit gnikit merged commit 99a95b7 into fortran-lang:master Jun 3, 2024
17 checks passed
@albertziegenhagel albertziegenhagel deleted the pp-nested-if branch June 4, 2024 06:29
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.

Incorrect handling of nested preprocessor if/else blocks
2 participants