Commit d4dfe7d6 by Dave Brolley Committed by Dave Brolley

lex.c: (handle_sysv_pragma): FILE* parameter not used.

Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
	* lex.c: (handle_sysv_pragma): FILE* parameter not used.
	(cpp_reader,parse_in): Add for cpplib.
	(check_newline): Call handle_sysv_pragma with new interface.
	(check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
	* input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
	(sub_getch): Call GETC for cpplib.
	* cp-tree.h: (get_directive_line): Different prototype for cpplib.
	(GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
	* Makefile.in (CXX_OBJS): add @extra_cxx_objs@ for cpplib.

From-SVN: r19927
parent c8724862
Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
* lex.c: (handle_sysv_pragma): FILE* parameter not used.
(cpp_reader,parse_in): Add for cpplib.
(check_newline): Call handle_sysv_pragma with new interface.
(check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
* input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
(sub_getch): Call GETC for cpplib.
* cp-tree.h: (get_directive_line): Different prototype for cpplib.
(GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
* Makefile.in (CXX_OBJS): add @extra_cxx_objs@ for cpplib.
1998-05-21 Jason Merrill <jason@yorick.cygnus.com> 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (maybe_make_one_only): New fn. * decl2.c (maybe_make_one_only): New fn.
......
...@@ -176,7 +176,8 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config ...@@ -176,7 +176,8 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config
CXX_OBJS = call.o decl.o errfn.o expr.o pt.o sig.o typeck2.o \ CXX_OBJS = call.o decl.o errfn.o expr.o pt.o sig.o typeck2.o \
class.o decl2.o error.o lex.o parse.o ptree.o rtti.o spew.o typeck.o cvt.o \ class.o decl2.o error.o lex.o parse.o ptree.o rtti.o spew.o typeck.o cvt.o \
except.o friend.o init.o method.o search.o semantics.o tree.o xref.o repo.o except.o friend.o init.o method.o search.o semantics.o tree.o xref.o repo.o \
@extra_cxx_objs@
# Language-independent object files. # Language-independent object files.
OBJS = `cat ../stamp-objlist` ../c-common.o ../c-pragma.o OBJS = `cat ../stamp-objlist` ../c-common.o ../c-pragma.o
......
...@@ -1639,7 +1639,13 @@ extern tree convert_and_check PROTO((tree, tree)); ...@@ -1639,7 +1639,13 @@ extern tree convert_and_check PROTO((tree, tree));
extern void overflow_warning PROTO((tree)); extern void overflow_warning PROTO((tree));
extern void unsigned_conversion_warning PROTO((tree, tree)); extern void unsigned_conversion_warning PROTO((tree, tree));
/* Read the rest of the current #-directive line. */ /* Read the rest of the current #-directive line. */
#if USE_CPPLIB
extern char *get_directive_line PROTO((void));
#define GET_DIRECTIVE_LINE() get_directive_line ()
#else
extern char *get_directive_line PROTO((FILE *)); extern char *get_directive_line PROTO((FILE *));
#define GET_DIRECTIVE_LINE() get_directive_line (finput)
#endif
/* Subroutine of build_binary_op, used for comparison operations. /* Subroutine of build_binary_op, used for comparison operations.
See if the operands have both been converted from subword integer types See if the operands have both been converted from subword integer types
and, if so, perhaps change them both back to their original type. */ and, if so, perhaps change them both back to their original type. */
......
...@@ -59,6 +59,14 @@ extern int lineno; ...@@ -59,6 +59,14 @@ extern int lineno;
#define inline #define inline
#endif #endif
#if USE_CPPLIB
extern unsigned char *yy_cur, *yy_lim;
extern int yy_get_token ();
#define GETC() (yy_cur < yy_lim ? *yy_cur++ : yy_get_token ())
#else
#define GETC() getc (finput)
#endif
extern void feed_input PROTO((char *, int)); extern void feed_input PROTO((char *, int));
extern void put_input PROTO((int)); extern void put_input PROTO((int));
extern void put_back PROTO((int)); extern void put_back PROTO((int));
...@@ -168,7 +176,7 @@ sub_getch () ...@@ -168,7 +176,7 @@ sub_getch ()
} }
return (unsigned char)input->str[input->offset++]; return (unsigned char)input->str[input->offset++];
} }
return getc (finput); return GETC ();
} }
inline inline
......
...@@ -83,7 +83,7 @@ static void reinit_parse_for_expr PROTO((struct obstack *)); ...@@ -83,7 +83,7 @@ static void reinit_parse_for_expr PROTO((struct obstack *));
static int *init_cpp_parse PROTO((void)); static int *init_cpp_parse PROTO((void));
static int handle_cp_pragma PROTO((char *)); static int handle_cp_pragma PROTO((char *));
#ifdef HANDLE_SYSV_PRAGMA #ifdef HANDLE_SYSV_PRAGMA
static int handle_sysv_pragma PROTO((FILE *, int)); static int handle_sysv_pragma PROTO((int));
#endif #endif
#ifdef GATHER_STATISTICS #ifdef GATHER_STATISTICS
#ifdef REDUCE_LENGTH #ifdef REDUCE_LENGTH
...@@ -112,7 +112,10 @@ file_name_nondirectory (x) ...@@ -112,7 +112,10 @@ file_name_nondirectory (x)
struct obstack inline_text_obstack; struct obstack inline_text_obstack;
char *inline_text_firstobj; char *inline_text_firstobj;
#if !USE_CPPLIB #if USE_CPPLIB
#include "cpplib.h"
extern cpp_reader parse_in;
#else
FILE *finput; FILE *finput;
#endif #endif
int end_of_file; int end_of_file;
...@@ -2198,9 +2201,6 @@ get_last_nonwhite_on_line () ...@@ -2198,9 +2201,6 @@ get_last_nonwhite_on_line ()
int linemode; int linemode;
#ifdef HANDLE_SYSV_PRAGMA
static int handle_sysv_pragma PROTO((FILE *, int));
#endif
static int handle_cp_pragma PROTO((char *)); static int handle_cp_pragma PROTO((char *));
static int static int
...@@ -2261,12 +2261,17 @@ check_newline () ...@@ -2261,12 +2261,17 @@ check_newline ()
goto skipline; goto skipline;
#ifdef HANDLE_SYSV_PRAGMA #ifdef HANDLE_SYSV_PRAGMA
if (handle_sysv_pragma (finput, token)) if (handle_sysv_pragma (token))
goto skipline; goto skipline;
#else #else
#ifdef HANDLE_PRAGMA #ifdef HANDLE_PRAGMA
#if USE_CPPLIB
/* TODO: ??? */
goto skipline;
#else
if (HANDLE_PRAGMA (finput, yylval.ttype)) if (HANDLE_PRAGMA (finput, yylval.ttype))
goto skipline; goto skipline;
#endif /* !USE_CPPLIB */
#endif #endif
#endif #endif
} }
...@@ -2281,7 +2286,7 @@ check_newline () ...@@ -2281,7 +2286,7 @@ check_newline ()
&& getch () == 'e' && getch () == 'e'
&& ((c = getch ()) == ' ' || c == '\t')) && ((c = getch ()) == ' ' || c == '\t'))
{ {
debug_define (lineno, get_directive_line (finput)); debug_define (lineno, GET_DIRECTIVE_LINE ());
goto skipline; goto skipline;
} }
} }
...@@ -2293,7 +2298,7 @@ check_newline () ...@@ -2293,7 +2298,7 @@ check_newline ()
&& getch () == 'f' && getch () == 'f'
&& ((c = getch ()) == ' ' || c == '\t')) && ((c = getch ()) == ' ' || c == '\t'))
{ {
debug_undef (lineno, get_directive_line (finput)); debug_undef (lineno, GET_DIRECTIVE_LINE ());
goto skipline; goto skipline;
} }
} }
...@@ -4749,8 +4754,7 @@ handle_cp_pragma (pname) ...@@ -4749,8 +4754,7 @@ handle_cp_pragma (pname)
the token types. */ the token types. */
static int static int
handle_sysv_pragma (finput, token) handle_sysv_pragma (token)
FILE *finput;
register int token; register int token;
{ {
for (;;) for (;;)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment