This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/58687] "#line __LINE__ ..." changes subsequent line numbers


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

--- Comment #28 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Well, I also think the existing choice is the more natural choice for the 
value of __LINE__ in this case (#line is mainly for use by code 
generators, which can always count lines and specify the desired number 
when changing the filename).  And the note on the patch "Note that this 
solution is not robust; hiding the __LINE__ reference inside another macro 
will bypass this special case test." indicates changing the choice is not 
so simple after all (having a choice of line number that depends on 
whether __LINE__ is inside another macro seems even less natural).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]