[C++ PATCH] // comments

Nathan Sidwell nathan@codesourcery.com
Wed May 16 02:48:00 GMT 2001


Hi,
I've installed this on both branch and mainline, which fixes a regression
where we would remove comments that'd managed to get through to stage3
of processing.

built & tested on i686-pc-linux-gnu,

nathan
-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2001-05-08  Nathan Sidwell  <nathan@codesourcery.com>

	* cpplex.c (_cpp_lex_token, '/' case): Comments can't appear
	after stage3.

Index: cpplex.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpplex.c,v
retrieving revision 1.137
diff -c -3 -p -r1.137 cpplex.c
*** cpplex.c	2001/04/11 09:43:10	1.137
--- cpplex.c	2001/05/09 07:51:55
*************** _cpp_lex_token (pfile, result)
*** 990,996 ****
  	ACCEPT_CHAR (CPP_DIV_EQ);
        if (c != '/' && c != '*')
  	break;
! 
        if (c == '*')
  	{
  	  if (skip_block_comment (pfile))
--- 990,998 ----
  	ACCEPT_CHAR (CPP_DIV_EQ);
        if (c != '/' && c != '*')
  	break;
!       if (buffer->from_stage3)
! 	break;
!       
        if (c == '*')
  	{
  	  if (skip_block_comment (pfile))


More information about the Gcc-patches mailing list