Skip to content

Commit 8b5eacb

Browse files
authored
[flang][NFC] Document an extension (#71609)
Fortran free form line continuation with '&' works with this compiler even across the end of an included source file, as it does with most other Fortran compilers. This extension should be documented.
1 parent f06ea10 commit 8b5eacb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

flang/docs/Extensions.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ end
293293
it's an error only if the resolution is ambiguous.
294294
* An entity may appear in a `DATA` statement before its explicit
295295
type declaration under `IMPLICIT NONE(TYPE)`.
296-
* INCLUDE lines can start in any column, can be preceded in
296+
* `INCLUDE` lines can start in any column, can be preceded in
297297
fixed form source by a '0' in column 6, can contain spaces
298298
between the letters of the word INCLUDE, and can have a
299299
numeric character literal kind prefix on the file name.
@@ -312,6 +312,9 @@ end
312312
a portability warning.
313313
The Fortran standard doesn't allow `SIZE=` with formatted input
314314
modes that might require look-ahead, perhaps to ease implementations.
315+
* When a file included via an `INCLUDE` line or `#include` directive
316+
has a continuation marker at the end of its last line in free form,
317+
Fortran line continuation works.
315318

316319
### Extensions supported when enabled by options
317320

@@ -439,7 +442,7 @@ end
439442
This is especially desirable when two generics of the same
440443
name are combined due to USE association and the mixture may
441444
be inadvertent.
442-
* Since Fortran 90, INCLUDE lines have been allowed to have
445+
* Since Fortran 90, `INCLUDE` lines have been allowed to have
443446
a numeric kind parameter prefix on the file name. No other
444447
Fortran compiler supports them that I can find.
445448
* A `SEQUENCE` derived type is required (F'2023 C745) to have

0 commit comments

Comments
 (0)