[Bug c++/77462] Error message prints source from wrong file after #line

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Sep 3 17:43:00 GMT 2016


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm, I think this is expected.  Take a good example of why #line are used in
the first place: generated files.

IF you are playing preprocessor tricks like this, you get what you deserve in
the error message.  

In fact I would say clang got it all wrong.


More information about the Gcc-bugs mailing list