[Bug fortran/124690] gfortran preprocessor recurses where the C standard precludes recursion

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 30 04:24:44 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124690

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Unlike standard macro expansion, traditional macro expansion has no provision
to prevent recursion. If an object-like macro appears unquoted in its
replacement text, it will be replaced again during the rescan pass, and so on
ad infinitum. GCC detects when it is expanding recursive macros, emits an error
message, and continues after the offending macro invocation.


More information about the Gcc-bugs mailing list