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

Use preprocessor in traditional mode #1383

Conversation

dmikushin
Copy link
Contributor

Fortran compiler is supposed to use traditional C preprocessor only. Therefore, we can't use modern C preprocessor features, such as catenation or stringizing

…Therefore, we can't use modern C preprocessor features, such as catenation or stringizing
@bryanpkc
Copy link
Collaborator

gfortran's preprocessor does not support stringization. There may be a historical reason for that, but we should be able to provide improved preprocessing functionality. LLVM Flang's preprocessor supports stringization (see https://github.com/llvm/llvm-project/blob/main/flang/test/Preprocessing/pp045.F, https://github.com/llvm/llvm-project/blob/main/flang/test/Preprocessing/pp131.F), so I don't think we need to change anything in Classic Flang.

@bryanpkc
Copy link
Collaborator

This PR will not be accepted as-is, so closing it for now.

@bryanpkc bryanpkc closed this Oct 18, 2023
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.

2 participants