Skip to content

disable GNU #line macros, add flag to activate it

Hans-Nikolai Viessmann requested to merge hans/sac2c:hans-gnu-debug-flag into develop

This commit disables an internal feature in print.c that adds GNU #line macros to the generated C source code. This macro includes the source line indicated and stores this in place of the actual source line being called. With this one can map SAC code to segments of C code.

It is not entirely clear how this is useful, and under most circumstances this leads to confusion as C source lines do not line-up with SAC code (mostly).

Rather then removing this from print.c, this commit introduces the -gg flag to activate the #line macro feature (in addition to what is include normally with -g).

Edited by Hans-Nikolai Viessmann

Merge request reports