Commit 056487e7 by Neil Booth Committed by Neil Booth

Makefile.in: Remove MAYBE_CPPLIB and maybe_cpplib.

        * Makefile.in: Remove MAYBE_CPPLIB and maybe_cpplib.
        * c-decl.c: Remove parse_in declaration.
        * c-lang.c: Similarly.
        * c-lex.c: Similarly.
        * c-parse.in: Similarly.
        * c-pragma.c: Similarly.
        * configure.in: Similarly.
        * cp/Make-lang.in: Similarly.
        * cp/spew.c: Similarly.
        * cp/decl2.c: Remove check for lang-c++ option.
        * cp/lang-specs.h: Remove -lang-c++ from cc1plus command line.
        * cp/lex.c (lang_init_options): With cpp_reader_init, default to C++.
        * c-lex.h: Add declaration of parse_in.
        * cppinit.c: Call set_lang after allocating pfile->pending.
        * configure: Regenerate.

From-SVN: r37754
parent 7dcae299
2000-11-26 Neil Booth <neilb@earthling.net>
* Makefile.in: Remove MAYBE_CPPLIB and maybe_cpplib.
* c-decl.c: Remove parse_in declaration.
* c-lang.c: Similarly.
* c-lex.c: Similarly.
* c-parse.in: Similarly.
* c-pragma.c: Similarly.
* configure.in: Similarly.
* cp/Make-lang.in: Similarly.
* cp/spew.c: Similarly.
* cp/decl2.c: Remove check for lang-c++ option.
* cp/lang-specs.h: Remove -lang-c++ from cc1plus command line.
* cp/lex.c (lang_init_options): With cpp_reader_init, default to C++.
* c-lex.h: Add declaration of parse_in.
* cppinit.c: Call set_lang after allocating pfile->pending.
* configure: Regenerate.
2000-11-25 Zack Weinberg <zack@wolery.stanford.edu>
* combine.c (try_combine): Remove redundant test.
......
......@@ -442,10 +442,6 @@ MAYBE_USE_COLLECT2 = @maybe_use_collect2@
# so don't override it here.
USE_COLLECT2 = collect2$(exeext)
# configure sets this to 'libcpp.a' if cpplib is being merged into
# C-family front ends.
MAYBE_CPPLIB = @maybe_cpplib@
# List of extra C and assembler files to add to libgcc1.a.
# Assembler files should have names ending in `.asm'.
LIB1FUNCS_EXTRA =
......@@ -721,7 +717,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@
# Language-specific object files for C and Objective C.
C_AND_OBJC_OBJS = c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \
c-convert.o c-aux-info.o c-common.o c-semantics.o c-dump.o $(MAYBE_CPPLIB) \
c-convert.o c-aux-info.o c-common.o c-semantics.o c-dump.o libcpp.a \
$(C_TARGET_OBJS)
# Language-specific object files for C.
......
......@@ -42,7 +42,6 @@ Boston, MA 02111-1307, USA. */
#include "ggc.h"
#include "tm_p.h"
#include "cpplib.h"
extern cpp_reader parse_in;
/* In grokdeclarator, distinguish syntactic contexts of declarators. */
enum decl_context
......
......@@ -36,7 +36,6 @@ Boston, MA 02111-1307, USA. */
#include "c-lex.h"
#include "cpplib.h"
extern cpp_reader parse_in;
static int c_tree_printer PARAMS ((output_buffer *));
/* Each of the functions defined here
......
......@@ -53,8 +53,6 @@ Boston, MA 02111-1307, USA. */
#define GET_ENVIRONMENT(ENV_VALUE,ENV_NAME) ((ENV_VALUE) = getenv (ENV_NAME))
#endif
extern cpp_reader parse_in;
/* The original file name, before changing "-" to "stdin". */
static const char *orig_filename;
......
......@@ -2830,7 +2830,6 @@ end ifobjc
cpplib.h's token codes into yacc's token codes. */
static enum cpp_ttype last_token;
extern cpp_reader parse_in;
/* The reserved keyword table. */
struct resword
......
......@@ -32,8 +32,6 @@ Boston, MA 02111-1307, USA. */
#include "c-lex.h"
#include "tm_p.h"
extern cpp_reader parse_in;
#define BAD(msgid) do { warning (msgid); return; } while (0)
#define BAD2(msgid, arg) do { warning (msgid, arg); return; } while (0)
......
......@@ -271,9 +271,6 @@ elif test x$withval != xno; then
cpp_install_dir=$withval
fi])
maybe_cpplib=libcpp.a
AC_SUBST(maybe_cpplib)
# Enable Multibyte Characters for C/C++
AC_ARG_ENABLE(c-mbchar,
[ --enable-c-mbchar Enable multibyte characters for C and C++.],
......
......@@ -103,9 +103,9 @@ CXX_OBJS = cp/call.o cp/decl.o cp/errfn.o cp/expr.o cp/pt.o cp/typeck2.o \
cp-warn =
cc1plus$(exeext): $(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) \
$(MAYBE_CPPLIB) $(LIBDEPS)
libcpp.a $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
$(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) $(MAYBE_CPPLIB) $(LIBS)
$(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) libcpp.a $(LIBS)
# Special build rules.
$(srcdir)/cp/cfns.h: $(srcdir)/cp/cfns.gperf
......
......@@ -573,8 +573,6 @@ lang_decode_option (argc, argv)
if (!strcmp (p, "-ftraditional") || !strcmp (p, "-traditional"))
/* ignore */;
else if (!strcmp (p, "-lang-c++"))
/* ignore - cpplib needs to see this */;
else if (p[0] == '-' && p[1] == 'f')
{
/* Some kind of -f option.
......
......@@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */
%{save-temps:cpp0 -lang-c++ %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
%(cpp_options) %b.ii \n}\
cc1plus %{save-temps:-fpreprocessed %b.ii}\
%{!save-temps:%(cpp_options)} -lang-c++\
%{!save-temps:%(cpp_options)}\
%{!no-gcc:-D__GNUG__=%v1}\
%{fnew-abi:-D__GXX_ABI_VERSION=100}\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
......@@ -47,5 +47,5 @@ Boston, MA 02111-1307, USA. */
{".ii", "@c++-cpp-output"},
{"@c++-cpp-output",
"%{!M:%{!MM:%{!E:\
cc1plus -lang-c++ -fpreprocessed %i %(cc1_options) %2 %{+e*}\
cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
%{!fsyntax-only:%(invoke_as)}}}}"},
......@@ -247,7 +247,7 @@ void
lang_init_options ()
{
cpp_init ();
cpp_reader_init (&parse_in, CLK_GNUC89);
cpp_reader_init (&parse_in, CLK_GNUCXX);
/* Default exceptions on. */
flag_exceptions = 1;
......
......@@ -45,8 +45,6 @@ Boston, MA 02111-1307, USA. */
#define SPEW_INLINE inline
#endif
extern cpp_reader parse_in;
/* 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
backtracking. */
......
......@@ -541,7 +541,6 @@ cpp_reader_init (pfile, lang)
cpp_init ();
}
set_lang (pfile, lang);
CPP_OPTION (pfile, warn_import) = 1;
CPP_OPTION (pfile, warn_paste) = 1;
CPP_OPTION (pfile, discard_comments) = 1;
......@@ -551,6 +550,9 @@ cpp_reader_init (pfile, lang)
CPP_OPTION (pfile, pending) =
(struct cpp_pending *) xcalloc (1, sizeof (struct cpp_pending));
/* After creating pfile->pending. */
set_lang (pfile, lang);
/* Initialize lexer state. */
pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments);
......
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