This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/69391] Incorrect __LINE__ expansion with -ftrack-macro-expansion=0 on g++5.2
- From: "mail at bobah dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Jan 2016 16:44:45 +0000
- Subject: [Bug preprocessor/69391] Incorrect __LINE__ expansion with -ftrack-macro-expansion=0 on g++5.2
- Auto-submitted: auto-generated
- References: <bug-69391-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69391
--- Comment #2 from mail at bobah dot net ---
And if I make this change it works even with '-ftrack-macro-expansion=0'
- #define LINE STR(__LINE__) STR(__LINE__)
+ #define LINE() STR(__LINE__) STR(__LINE__)
- std::cout << LINE << "\n";
+ std::cout << LINE() << "\n";