[all-commits] [llvm/llvm-project] fc1c48: [flang][preprocessor] Change handling of macros in...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Thu Sep 12 09:08:23 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fc1c481cf45b41137a08a753c543d8a69d393671
https://github.com/llvm/llvm-project/commit/fc1c481cf45b41137a08a753c543d8a69d393671
Author: Peter Klausler <pklausler at nvidia.com>
Date: 2024-09-12 (Thu, 12 Sep 2024)
Changed paths:
M flang/lib/Parser/preprocessor.cpp
M flang/lib/Parser/prescan.cpp
M flang/lib/Parser/prescan.h
M flang/module/__fortran_builtins.f90
M flang/module/__fortran_ieee_exceptions.f90
M flang/module/ieee_arithmetic.f90
M flang/module/iso_fortran_env.f90
M flang/test/Driver/include-header.f90
A flang/test/Preprocessing/include-file.h
A flang/test/Preprocessing/include-line.F90
Log Message:
-----------
[flang][preprocessor] Change handling of macros in text from Fortran … (#108113)
…INCLUDE lines
The compiler current treats an INCLUDE line as essentially a synonym for
a preprocessing #include directive. The causes macros that have been
defined at the point where the INCLUDE line is processed to be replaced
within the text of the included file.
This behavior is surprising to users who expect an INCLUDE line to be
expanded into its contents *after* preprocessing has been applied to the
original source file, with no further macro expansion.
Change INCLUDE line processing to use a fresh instance of Preprocessor
containing no macro definitions except _CUDA in CUDA Fortran
compilations and, if the original file was being preprocessed, the
standard definitions of __FILE__, __LINE__, and so forth.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list