[Bug preprocessor/80071] __LINE__ is expanded incorrectly

2017-03-16 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80071 --- Comment #6 from joseph at codesourcery dot com --- Note that there are two different proposals regarding __LINE__ for Markham. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2115.htm http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2129.p

[Bug preprocessor/80071] __LINE__ is expanded incorrectly

2017-03-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80071 --- Comment #5 from Martin Sebor --- 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 her

[Bug preprocessor/80071] __LINE__ is expanded incorrectly

2017-03-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80071 --- Comment #4 from Martin Sebor --- I should mention: the GCC __COUNTER__ macro can be used to generate a unique integer each time it's expanded.

[Bug preprocessor/80071] __LINE__ is expanded incorrectly

2017-03-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80071 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug preprocessor/80071] __LINE__ is expanded incorrectly

2017-03-16 Thread sxlijin+gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80071 --- Comment #2 from Samuel Lijin --- They are? That's a legitimate question, I'd never heard that before but I can totally believe it; I am looking through N4606 right now, though, and can't find anything that implies one way or another (maybe [l

[Bug preprocessor/80071] __LINE__ is expanded incorrectly

2017-03-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80071 --- Comment #1 from Andrew Pinski --- IIRC multiple line macros function uses are an extension to the language.