patch to cpplib handle_directive

Jason Merrill jason@cygnus.com
Wed Sep 22 12:20:00 GMT 1999


Wed Sep 22 12:04:58 1999  Jason Merrill  <jason@yorick.cygnus.com>

	* cpplib.c (handle_directive): Don't complain about `# NUMBER' if
	we're seeing this input for a second time.

Index: cpplib.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cpplib.c,v
retrieving revision 1.93
diff -c -p -r1.93 cpplib.c
*** cpplib.c	1999/09/11 05:38:06	1.93
--- cpplib.c	1999/09/22 19:17:25
*************** handle_directive (pfile)
*** 528,535 ****
    c = PEEKC ();
    if (c >= '0' && c <= '9')
      {
!       /* Handle # followed by a line number.  */
!       if (CPP_PEDANTIC (pfile))
  	cpp_pedwarn (pfile, "`#' followed by integer");
        do_line (pfile, NULL);
        return 1;
--- 528,539 ----
    c = PEEKC ();
    if (c >= '0' && c <= '9')
      {
!       /* Handle # followed by a line number.  Complain about using that
!          form if we're being pedantic, but not if this is regurgitated
!          input (preprocessed or fed back in by the C++ frontend).  */
!       if (CPP_PEDANTIC (pfile)
! 	  && ! CPP_PREPROCESSED (pfile)
! 	  && ! CPP_BUFFER (pfile)->manual_pop)
  	cpp_pedwarn (pfile, "`#' followed by integer");
        do_line (pfile, NULL);
        return 1;


More information about the Gcc-patches mailing list