This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix to HANDLE_PRAGMA with --enable-c-cpplib
- To: gcc-patches at gcc dot gnu dot org
- Subject: fix to HANDLE_PRAGMA with --enable-c-cpplib
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Wed, 1 Dec 1999 17:32:20 GMT
- Reply-to: nickc at cygnus dot co dot uk
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 */