https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80071
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> --- Another reference worth mentioning here is section 6.5 Value of the __LINE__ macro in WG21 document N4220: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4220.pdf. It discusses the issue raised here. I don't think the changes proposed in the paper have been rolled into the C++ standard but I believe the author is still working on it and collaborating with WG14.