http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58687
Max TenEyck Woodbury <mtewoodbury at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major --- Comment #4 from Max TenEyck Woodbury <mtewoodbury at gmail dot com> --- Why is this important? 1) There must be a way to modify the '__FILE__' value without messing up the '__LINE__' value. A 'Google' shows that the expected way to do this is: # line __LINE__ "new-__FILE__-value" but with this bug, the __LINE__ value gets messed up and all subsequent diagnostics are off by at least one. It also makes debugging more difficult if not impossible. Now, why change the '__FILE__' value? Simply to make identification host independent. The fact that my projects are stored on '/VOL10' on one of my machines and '/DATA0.2' on another only confuses any trouble reports. What is important is that the file is 'myproject/configure.c' (or whatever). 2) Similarly, adding multi-line comments to the '# line __LINE__ ...' directive should NOT mess with the line numbering. 3) Why not use a specific value in place of '__LINE__'? Because that embeds a maintenance problem that should not be there into the source. If something gets added before the '# line <n> ...' directive, then <n> has to be updated. If the source is 'generated' by some tool, this is reasonable, but it is NOT reasonable for base level source files. Similarly, there should be a freedom to edit the comment without having to play with the line number.