From be72d9afe01374c5453d9c1460205d0ceaf35996 Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Thu, 30 Jul 2026 15:25:31 -0700 Subject: [PATCH] Update CPP_STRINGIFY_SOURCE for LFortran LFortran 0.60 added preprocessor support for the CPP-style stringification operator (#), so use it. --- include/assert_macros.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/assert_macros.h b/include/assert_macros.h index ed6e390..99799f5 100644 --- a/include/assert_macros.h +++ b/include/assert_macros.h @@ -13,7 +13,8 @@ ! Deal with stringification issues: ! https://gcc.gnu.org/legacy-ml/fortran/2009-06/msg00131.html #ifndef CPP_STRINGIFY_SOURCE -# if defined(__GFORTRAN__) || defined(_CRAYFTN) || defined(NAGFOR) || defined(__LFORTRAN__) +# if defined(__GFORTRAN__) || defined(_CRAYFTN) || defined(NAGFOR) || \ + (defined(__LFORTRAN__) && __LFORTRAN_MAJOR__ == 0 && __LFORTRAN_MINOR__ < 60) # define CPP_STRINGIFY_SOURCE(x) "x" # else # define CPP_STRINGIFY_SOURCE(x) #x