This is the mail archive of the gcc-patches@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]

fix to HANDLE_PRAGMA with --enable-c-cpplib


Hi Guys,

  The patch below fixes a small bug in the invocation of the
  HANDLE_PRAGMA macro.  I the sources are compiled with
  --enable-c-cpplib, then the functions getch() and put_back() do not
  exist, so the support functions pragma_getc and pragma_ungetc should
  be used instead.

  Is this patch OK to apply ?

Cheers
	Nick


1999-12-01  Nick Clifton  <nickc@cygnus.com>

	* c-lex.c (check_newline): Pass pragma_getc and pragma_ungetc
	to HANDLE_PRAGMA.

Index: c-lex.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-lex.c,v
retrieving revision 1.67
diff -p -r1.67 c-lex.c
*** c-lex.c	1999/11/30 23:26:37	1.67
--- c-lex.c	1999/12/01 17:27:21
*************** check_newline ()
*** 638,644 ****
  	     (if both are defined), in order to give the back
  	     end a chance to override the interpretation of
  	     SYSV style pragmas.  */
! 	  if (HANDLE_PRAGMA (getch, put_back,
  			     IDENTIFIER_POINTER (yylval.ttype)))
  	    goto skipline;
  #endif /* HANDLE_PRAGMA */
--- 638,644 ----
  	     (if both are defined), in order to give the back
  	     end a chance to override the interpretation of
  	     SYSV style pragmas.  */
! 	  if (HANDLE_PRAGMA (pragma_getc, pragma_ungetc,
  			     IDENTIFIER_POINTER (yylval.ttype)))
  	    goto skipline;
  #endif /* HANDLE_PRAGMA */


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