[flang] Document preprocessing of Fortran comments in macro actual args
authorpeter klausler <pklausler@nvidia.com>
Wed, 10 Jul 2019 22:03:02 +0000 (15:03 -0700)
committerpeter klausler <pklausler@nvidia.com>
Wed, 10 Jul 2019 23:42:07 +0000 (16:42 -0700)
Original-commit: flang-compiler/f18@f491b73636fe95ede63d9f402d14e6f29250f95b
Reviewed-on: https://github.com/flang-compiler/f18/pull/557
Tree-same-pre-rewrite: false

flang/documentation/Extensions.md
flang/documentation/Preprocessing.md

index 5a66e10..b3265f7 100644 (file)
@@ -125,3 +125,10 @@ Extensions and legacy features deliberately not supported
 * Using non-integer expressions for array bounds (e.g., REAL A(3.14159)) (PGI/Intel)
 * Mixing INTEGER types as operands to bit intrinsics (e.g., IAND); only two
   compilers support it, and they disagree on sign extension.
+
+Preprocessing behavior
+======================
+* The preprocessor is always run, whatever the filename extension may be.
+* We respect Fortran comments in macro actual arguments (like GNU, Intel, NAG;
+  unlike PGI and XLF) on the principle that macro calls should be treated
+  like function references.  Fortran's line continuation methods also work.
index 94e5939..6b246f3 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-Copyright (c) 2018, NVIDIA CORPORATION.  All rights reserved.
+Copyright (c) 2018-2019, NVIDIA CORPORATION.  All rights reserved.
 -->
 
 Fortran Preprocessing
@@ -72,6 +72,8 @@ Judgement calls, where precedents are unclear:
 * `#define c 1` does not allow a `c` in column 1 to be used as a label
   in fixed form, rather than as a comment line indicator.
 * IBM claims to be ISO C compliant and therefore recognizes trigraph sequences.
+* Fortran comments in macro actual arguments should be respected, on
+  the principle that a macro call should work like a function reference.
 
 Behavior that few compilers properly support (or none), but should:
 -------------------------------------------------------------------