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

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 09:04:29 PST 2021


klausler added a comment.

The behavior of a preprocessor is always present, even with "-nocpp"; preprocessing is an integrated part of prescanning, not a separate pass or process.  The preprocessor instances used to be unconditionally initialized with some macro definitions from -D options and built-in names like __FILE__; those initializations are now conditional, so that unexpected macro replacement will not occur.  The motivation for this change is from an application that defined -DPIC on the command line and had a variable named PIC in a *.f90 file.

The list of file suffixes that will observe predefined macros in f18 is probably incomplete; I don't know what to do with *.ff files, for example.  I would not view it as being authoritative if I were 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