[all-commits] [llvm/llvm-project] 28eec1: [flang] Portability warning and documentation for ...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Fri Jul 21 14:31:01 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 28eec1bd85d2a0eb342fbad8fb2cace389e772d5
https://github.com/llvm/llvm-project/commit/28eec1bd85d2a0eb342fbad8fb2cace389e772d5
Author: Peter Klausler <pklausler at nvidia.com>
Date: 2023-07-21 (Fri, 21 Jul 2023)
Changed paths:
M flang/docs/Extensions.md
M flang/lib/Parser/prescan.cpp
A flang/test/Parser/continuation-before-quote.f90
Log Message:
-----------
[flang] Portability warning and documentation for an obscure extension
A quotation mark can appear in a Fortran character literal by doubling
it; for example, PRINT *, "'""'" prints '"'. When those doubled
quotation marks are split by a free form line continuation, the
continuation line should have an ampersand before the second quotation
mark. But most compilers, including this one, allow the second
quotation mark to appear as the first character on the continuation
line, too.
So this works:
print *, "'"&
"'"
but it really should be written as:
print *, "'"&
&"'"
Emit a portability warning and document that we support this near-universal
extension.
Differential Revision: https://reviews.llvm.org/D155973
More information about the All-commits
mailing list