From dfb0fb1d9072ea071a79d25bacae6304c8b022ea Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Wed, 9 Dec 1998 12:51:24 +0000 Subject: [PATCH] lex.c (lang_init_options): Initialize cpplib. Wed Dec 9 15:33:01 1998 Dave Brolley * lex.c (lang_init_options): Initialize cpplib. * decl2.c (parse_options,cpp_initialized): Removed. (lang_decode_option): Move initialization of cpplib to lang_init_options. From-SVN: r24221 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/decl2.c | 9 --------- gcc/cp/lex.c | 6 ++++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fc5d228611b..bc6665d9907 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +Wed Dec 9 15:33:01 1998 Dave Brolley + + * lex.c (lang_init_options): Initialize cpplib. + * decl2.c (parse_options,cpp_initialized): Removed. + (lang_decode_option): Move initialization of cpplib to + lang_init_options. + 1998-12-09 Mark Mitchell * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 9fc24fedc5f..570d2929ef2 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -46,8 +46,6 @@ Boston, MA 02111-1307, USA. */ #if USE_CPPLIB #include "cpplib.h" extern cpp_reader parse_in; -extern cpp_options parse_options; -static int cpp_initialized; #endif static tree get_sentry PROTO((tree)); @@ -523,13 +521,6 @@ lang_decode_option (argc, argv) int strings_processed; char *p = argv[0]; #if USE_CPPLIB - if (! cpp_initialized) - { - cpp_reader_init (&parse_in); - parse_in.opts = &parse_options; - cpp_options_init (&parse_options); - cpp_initialized = 1; - } strings_processed = cpp_handle_option (&parse_in, argc, argv); #else strings_processed = 0; diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 48085bdaf3a..4c118715706 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -388,6 +388,12 @@ char *cplus_tree_code_name[] = { void lang_init_options () { +#if USE_CPPLIB + cpp_reader_init (&parse_in); + parse_in.opts = &parse_options; + cpp_options_init (&parse_options); +#endif + /* Default exceptions on. */ flag_exceptions = 1; } -- 2.30.2