aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorNeil Booth <neilb@earthling.net>2000-11-25 19:28:44 +0000
committerNeil Booth <neil@gcc.gnu.org>2000-11-25 19:28:44 +0000
commita32f2771a5b1265435b332f15020b66bed552af4 (patch)
tree925e0c18e46eaa5d241ebbe1cd839d39fc0984a2 /gcc/cp
parent3e8aa6e31c6a745edcec9395021ef13ca0f0122f (diff)
downloadgcc-a32f2771a5b1265435b332f15020b66bed552af4.zip
gcc-a32f2771a5b1265435b332f15020b66bed552af4.tar.gz
gcc-a32f2771a5b1265435b332f15020b66bed552af4.tar.bz2
c-common.c: Remove USE_CPPLIB conditional inclusions.
* c-common.c: Remove USE_CPPLIB conditional inclusions. * c-common.h: Similarly. * c-decl.c: Similarly. * c-lang.c: Similarly. * c-lex.c: Similarly. * c-parse.in: Similarly. * c-pragma.c: Similarly. * c-pragma.h: Similarly. * gcc.c: Similarly. * toplev.c: Similarly. * cp/cp-tree.h: Similarly. * cp/decl2.c: Similarly. * cp/lang-specs.h: Similarly. * cp/lex.c: Similarly. * cp/lex.h: Similarly. * cp/spew.c: Similarly. * java/lang-options.h: Similarly. * objc/lang-specs.h: Similarly. * objc/objc-act.c: Similarly. * configure.in: Remove configure option. * config.in: Regenerate. * configure: Regenerate. From-SVN: r37742
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/cp-tree.h6
-rw-r--r--gcc/cp/decl2.c14
-rw-r--r--gcc/cp/lang-specs.h12
-rw-r--r--gcc/cp/lex.c41
-rw-r--r--gcc/cp/lex.h4
-rw-r--r--gcc/cp/spew.c14
6 files changed, 11 insertions, 80 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 34c9d13..ed233a2 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3214,13 +3214,9 @@ extern void unsigned_conversion_warning PARAMS ((tree, tree));
extern void c_apply_type_quals_to_decl PARAMS ((int, tree));
/* Read the rest of the current #-directive line. */
-#if USE_CPPLIB
extern char *get_directive_line PARAMS ((void));
#define GET_DIRECTIVE_LINE() get_directive_line ()
-#else
-extern char *get_directive_line PARAMS ((FILE *));
-#define GET_DIRECTIVE_LINE() get_directive_line (finput)
-#endif
+
/* Subroutine of build_binary_op, used for comparison operations.
See if the operands have both been converted from subword integer types
and, if so, perhaps change them both back to their original type. */
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 43874fb..a66bb95 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -45,11 +45,8 @@ Boston, MA 02111-1307, USA. */
#include "dwarfout.h"
#include "ggc.h"
#include "timevar.h"
-
-#if USE_CPPLIB
#include "cpplib.h"
extern cpp_reader parse_in;
-#endif
/* This structure contains information about the initializations
and/or destructions required for a particular priority level. */
@@ -566,20 +563,13 @@ compare_options (p1, p2)
int
lang_decode_option (argc, argv)
- int argc
-#if !USE_CPPLIB
- ATTRIBUTE_UNUSED
-#endif
- ;
+ int argc;
char **argv;
{
int strings_processed;
const char *p = argv[0];
-#if USE_CPPLIB
+
strings_processed = cpp_handle_option (&parse_in, argc, argv);
-#else
- strings_processed = 0;
-#endif /* ! USE_CPPLIB */
if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))
/* ignore */;
diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
index 6f9839b..1f1428b 100644
--- a/gcc/cp/lang-specs.h
+++ b/gcc/cp/lang-specs.h
@@ -29,7 +29,6 @@ Boston, MA 02111-1307, USA. */
{".c++", "@c++"},
{".C", "@c++"},
{"@c++",
-#if USE_CPPLIB
/* cc1plus has an integrated ISO C preprocessor. We should invoke
the external preprocessor if -save-temps is given. */
"%{E|M|MM:cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
@@ -44,16 +43,7 @@ Boston, MA 02111-1307, USA. */
%{fnew-abi:-D__GXX_ABI_VERSION=100}\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
%(cc1_options) %2 %{+e*}\
- %{!fsyntax-only:%(invoke_as)}}}}"
-#else /* ! USE_CPPLIB */
- "cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
- %{fnew-abi:-D__GXX_ABI_VERSION=100}\
- %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %(cpp_options)\
- %{!M:%{!MM:%{!E:%{!pipe:%g.ii} |\n\
- cc1plus -lang-c++ %{!pipe:%g.ii} %(cc1_options) %2 %{+e*}\
- %{!fsyntax-only:%(invoke_as)}}}}\n"
-#endif /* ! USE_CPPLIB */
- },
+ %{!fsyntax-only:%(invoke_as)}}}}"},
{".ii", "@c++-cpp-output"},
{"@c++-cpp-output",
"%{!M:%{!MM:%{!E:\
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 7e7da03..6498e7b 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -79,13 +79,7 @@ static void init_operators PARAMS ((void));
#endif
#include "cpplib.h"
-#if USE_CPPLIB
extern cpp_reader parse_in;
-#else
-FILE *finput;
-
-int linemode;
-#endif
/* Pending language change.
Positive is push count, negative is pop count. */
@@ -252,10 +246,8 @@ static const char *cplus_tree_code_name[] = {
void
lang_init_options ()
{
-#if USE_CPPLIB
cpp_init ();
cpp_reader_init (&parse_in, CLK_GNUC89);
-#endif
/* Default exceptions on. */
flag_exceptions = 1;
@@ -276,13 +268,6 @@ lang_init ()
if (flag_bounds_check < 0)
flag_bounds_check = flag_bounded_pointers;
-#if !USE_CPPLIB
- /* the beginning of the file is a new line; check for # */
- /* With luck, we discover the real source file's name from that
- and put it in input_filename. */
- ungetc (check_newline (), finput);
-#endif
-
if (flag_gnu_xref) GNU_xref_begin (input_filename);
init_repo (input_filename);
}
@@ -676,21 +661,16 @@ init_reswords ()
static void
init_cp_pragma ()
{
-#if USE_CPPLIB
-#define pfile &parse_in
-#else
-#define pfile 0
-#endif
- cpp_register_pragma (pfile, 0, "vtable", handle_pragma_vtable);
- cpp_register_pragma (pfile, 0, "unit", handle_pragma_unit);
+ cpp_register_pragma (&parse_in, 0, "vtable", handle_pragma_vtable);
+ cpp_register_pragma (&parse_in, 0, "unit", handle_pragma_unit);
- cpp_register_pragma (pfile, 0, "interface", handle_pragma_interface);
- cpp_register_pragma (pfile, 0, "implementation",
+ cpp_register_pragma (&parse_in, 0, "interface", handle_pragma_interface);
+ cpp_register_pragma (&parse_in, 0, "implementation",
handle_pragma_implementation);
- cpp_register_pragma_space (pfile, "GCC");
- cpp_register_pragma (pfile, "GCC", "interface", handle_pragma_interface);
- cpp_register_pragma (pfile, "GCC", "implementation",
+ cpp_register_pragma_space (&parse_in, "GCC");
+ cpp_register_pragma (&parse_in, "GCC", "interface", handle_pragma_interface);
+ cpp_register_pragma (&parse_in, "GCC", "implementation",
handle_pragma_implementation);
}
@@ -762,12 +742,8 @@ init_parse (filename)
void
finish_parse ()
{
-#if USE_CPPLIB
cpp_finish (&parse_in);
errorcount += parse_in.errors;
-#else
- fclose (finput);
-#endif
}
inline void
@@ -1174,12 +1150,9 @@ handle_pragma_implementation (dfile)
else
{
main_filename = TREE_STRING_POINTER (fname);
-#if USE_CPPLIB
-
if (cpp_included (&parse_in, main_filename))
warning ("#pragma implementation for %s appears after file is included",
main_filename);
-#endif
}
for (; ifiles; ifiles = ifiles->next)
diff --git a/gcc/cp/lex.h b/gcc/cp/lex.h
index 272a917..f5f7d45 100644
--- a/gcc/cp/lex.h
+++ b/gcc/cp/lex.h
@@ -70,10 +70,6 @@ typedef unsigned long RID_BIT_TYPE; /* assumed at least 32 bits */
used in a context which makes it a reference to a variable. */
extern tree lastiddecl;
-#if !USE_CPPLIB
-extern char *token_buffer; /* Pointer to token buffer. */
-#endif
-
/* Back-door communication channel to the lexer. */
extern int looking_for_typename;
extern int looking_for_template;
diff --git a/gcc/cp/spew.c b/gcc/cp/spew.c
index 0894993..e05b6f6 100644
--- a/gcc/cp/spew.c
+++ b/gcc/cp/spew.c
@@ -45,9 +45,7 @@ Boston, MA 02111-1307, USA. */
#define SPEW_INLINE inline
#endif
-#if USE_CPPLIB
extern cpp_reader parse_in;
-#endif
/* This takes a token stream that hasn't decided much about types and
tries to figure out as much as it can, with excessive lookahead and
@@ -327,11 +325,9 @@ read_token (t)
#undef YYCODE
case CPP_EOF:
-#if USE_CPPLIB
cpp_pop_buffer (&parse_in);
if (CPP_BUFFER (&parse_in))
goto retry;
-#endif
t->yychar = 0;
break;
@@ -1377,17 +1373,7 @@ debug_yychar (yy)
#endif
-#if USE_CPPLIB
#define NAME(type) cpp_type2name (type)
-#else
-/* Bleah */
-#include "symcat.h"
-#define OP(e, s) s,
-#define TK(e, s) STRINGX(e),
-
-static const char *type2name[N_TTYPES] = { TTYPE_TABLE };
-#define NAME(type) type2name[type]
-#endif
void
yyerror (msgid)