Skip to content
Unverified Commit 28eec1bd authored by Peter Klausler's avatar Peter Klausler
Browse files

[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
parent 290a98c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment