The fypp preprocessor has a bug where a resync linemarker is not emitted after single-line eval directives ($:, @:, inline #{...}#) when --line-numbering is active. When a macro expanded by one of these directives contains #ifdef/#endif blocks, downstream Fortran preprocessors (e.g. gfortran -cpp, flang) skip the content of never-taken branches but still advance their internal line counter over those physical lines. Without a resync marker after the expansion, all subsequent source lines are attributed to the wrong location, producing misleading compile-time diagnostics.
A patch is currently applied to fypp at build time to work around this:
toolchain/patches/fypp-linemarker-resync.patch
- applied in
toolchain/bootstrap/python.sh
An upstream fix has been submitted: aradi/fypp#66
Once that PR is merged and a new fypp release is tagged, the patch and its application logic in python.sh can be removed.
The fypp preprocessor has a bug where a resync linemarker is not emitted after single-line eval directives (
$:,@:, inline#{...}#) when--line-numberingis active. When a macro expanded by one of these directives contains#ifdef/#endifblocks, downstream Fortran preprocessors (e.g.gfortran -cpp,flang) skip the content of never-taken branches but still advance their internal line counter over those physical lines. Without a resync marker after the expansion, all subsequent source lines are attributed to the wrong location, producing misleading compile-time diagnostics.A patch is currently applied to fypp at build time to work around this:
toolchain/patches/fypp-linemarker-resync.patchtoolchain/bootstrap/python.shAn upstream fix has been submitted: aradi/fypp#66
Once that PR is merged and a new fypp release is tagged, the patch and its application logic in
python.shcan be removed.