c-lang.c: (parse_options,parse_in): Added.
authorDave Brolley <brolley@cygnus.com>
Wed, 9 Dec 1998 12:47:28 +0000 (12:47 +0000)
committerDave Brolley <brolley@gcc.gnu.org>
Wed, 9 Dec 1998 12:47:28 +0000 (07:47 -0500)
Wed Dec  9 15:29:26 1998  Dave Brolley  <brolley@cygnus.com>
* c-lang.c: (parse_options,parse_in): Added.
(lang_init_options): Initialized cpplib here.
* c-decl.c (parse_options,cpp_initialized): Removed.
(c_decode_option): Move initialization of cpplib to
lang_init_options.

From-SVN: r24219

gcc/ChangeLog
gcc/c-decl.c
gcc/c-lang.c

index 0523ba4c13546ca8cd9e38adf9edcd477e76ac67..93c15cb8b296080aca1ce7c57cc49f4dc5485b98 100644 (file)
@@ -1,3 +1,15 @@
+Wed Dec  9 15:29:26 1998  Dave Brolley  <brolley@cygnus.com>
+
+       * objc/objc-act.c (cpp_initialized): Removed.
+       (lang_init_options): Initialize cpplib.
+       (lang_decode_option): Move initialization of cpplib to
+       lang_init_options.
+       * c-lang.c: (parse_options,parse_in): Added.
+       (lang_init_options): Initialized cpplib here.
+       * c-decl.c (parse_options,cpp_initialized): Removed.
+       (c_decode_option): Move initialization of cpplib to
+       lang_init_options.
+
 Wed Dec  9 19:36:57 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * reload1.c (reload_combine, reload_combine_note_store):
index 7e10ab4b5a70b202c84f0564b33e1c41b7cf5ed3..9066bea53bd0dfe8f68504a7c99bf518701d715d 100644 (file)
@@ -37,9 +37,7 @@ 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;
+extern cpp_reader parse_in;
 #endif
 
 /* In grokdeclarator, distinguish syntactic contexts of declarators.  */
@@ -615,13 +613,6 @@ c_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;
index 6e04bd76f8b23d3ff8e7103bb54a57789480437f..ed2b9e46dbd85b77d26fbf32c0010bcd6cbefb26 100644 (file)
@@ -29,7 +29,10 @@ Boston, MA 02111-1307, USA.  */
 #include "output.h"
 
 #if USE_CPPLIB
+#include "cpplib.h"
 extern char *yy_cur;
+extern cpp_reader  parse_in;
+extern cpp_options parse_options;
 #endif
 
 /* Each of the functions defined here
@@ -46,6 +49,11 @@ lang_decode_option (argc, argv)
 void
 lang_init_options ()
 {
+#if USE_CPPLIB
+  cpp_reader_init (&parse_in);
+  parse_in.opts = &parse_options;
+  cpp_options_init (&parse_options);
+#endif
 }
 
 void