[flang-commits] [flang] [flang] Add __COUNTER__ preprocessor macro (PR #136827)
Andre Kuhlenschmidt via flang-commits
flang-commits at lists.llvm.org
Fri May 9 09:24:29 PDT 2025
================
@@ -138,6 +138,18 @@ text.
OpenMP-style directives that look like comments are not addressed by
this scheme but are obvious extensions.
+## Currently implemented built-ins
+
+* `__DATE__`: Date, given as e.g. "Jun 16 1904"
+* `__TIME__`: Time in 24-hour format including seconds, e.g. "09:24:13"
+* `__TIMESTAMP__`: Date, time and year of last modification, given as e.g. "Fri May 9 09:16:17 2025"
+* `__FILE__`: Current file
+* `__LINE__`: Current line
+
+### Non-standard extensions
----------------
akuhlens wrote:
I would leave this documentation here, and add a bullet point in extensions for the `__COUNTER__` macro in the [preprocessing behavior section](https://github.com/llvm/llvm-project/blob/main/flang/docs/Extensions.md#preprocessing-behavior). Doesn't have to be anything elaborate, maybe just the fact that it exists and a link to this bullet point.
https://github.com/llvm/llvm-project/pull/136827
More information about the flang-commits
mailing list