[PATCH] D96464: [flang] Don't perform macro replacement unless *.F, *.F90, &c.

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 10:14:26 PST 2021


awarzynski added a comment.

Thank you for clarifying, this helps a lot!

As there is no intention for `f18 -nocpp` (or `flang-new -nocpp`) to match the behavior of `gfortran -nocpp`, could we use different spellings? Also, I doubt that we would be able to re-use `-cpp/-nocpp` in `flang-new` for something other than enabling/disabling the preprocessor (these options are already present in Options.td <https://github.com/llvm/llvm-project/blob/0feff71eabd39fc93f3d9ec30ed16e26da6cf883/clang/include/clang/Driver/Options.td#L4140-L4141>).

I'm guessing that want something with semantics similar to `-ffree-form/-ffixed-form`. Naming is hard, but let me try suggesting something:

- `-fadd-pp-predefs/-fno-pp-predefs` (add preprocessor predefinitions)
- `-fno-macro-predefs/-fmacro-predefs` (add macro predefinitions)
- `-fno-std-macro-predefs/-fstd-macro-predefs` (add standard macro predefinitions)

Would any of these make sense to you?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96464/new/

https://reviews.llvm.org/D96464



More information about the llvm-commits mailing list