http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20262
Ollie Wild <aaw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aaw at gcc dot gnu.org
--- Comment #4 from Ollie Wild <aaw at gcc dot gnu.org> ---
We recently ran into this issue in a context where __LINE__ was being used to
produce goto labels inside a macro-wrapped block of code. The code in question
compiled fine with Clang/LLVM but produced a compiler error with GCC.
I've read through the standard (in this case, C++11), and as I read it
"presumed source line" is used to allow for the possibility of modifying the
source line via #line directives (which it says immediately thereafter in a
footnote), not as general consent to be liberal with line numbering.
Regardless, using the true physical line conforms to the principle of least
surprise.
Would anyone be opposed to revisiting this?