This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/25294] [4.0/4.1/4.2 Regression] Bogus "unterminated comment" error from #pragma comment



------- Comment #6 from mmitchel at gcc dot gnu dot org  2005-12-20 08:47 -------
The problem is that directives.c:do_pragma says:

          /* Squirrel away the pragma text.  Pragmas are                        
             newline-terminated. */

However, as this example shows, simply saving the entire line is incorrect; we
have not already performed the Phase 3 elimination of comments at this point. 
I don't see any good alternative other than to check for the specific case of a
comment starting on this line, and, if the comment is not ended before the end
of the line, treating the end of the pragma as occurring directly before the
comment, rather than at the end of the line.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25294


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]