]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* toplev.c (main): Call the front-end specific post_options
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Jan 2001 03:34:28 +0000 (03:34 +0000)
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Jan 2001 03:34:28 +0000 (03:34 +0000)
        hook if one is given.
        * toplev.h (struct_lang_hooks, lang_hooks): New.
        * c-lang.c (c_post_options, lang_hooks): Implement lang_hooks
        for the C front end.
        * cp/decl2.c (cxx_post_options, lang_hooks): Implement
        lang_hooks for the C++ front end.
        * objc/objc-act.c (objc_post_options, lang_hooks): Implement
        lang_hooks for the ObjC front end.
        * f/com.c (lang_hooks): Hooks for the Fortran front end.
        * java/lang.c (lang_hooks): Hooks for the Java front end.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38757 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-lang.c
gcc/cp/decl2.c
gcc/f/com.c
gcc/java/lang.c
gcc/objc/objc-act.c
gcc/toplev.c
gcc/toplev.h

index 2e6206c459bf617be4209931603e90247c5625f5..559b125db6e7b10987eff93cbabd86063db4c75e 100644 (file)
@@ -1,3 +1,17 @@
+2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+        * toplev.c (main): Call the front-end specific post_options
+        hook if one is given.
+        * toplev.h (struct_lang_hooks, lang_hooks): New.
+        * c-lang.c (c_post_options, lang_hooks): Implement lang_hooks
+        for the C front end.
+        * cp/decl2.c (cxx_post_options, lang_hooks): Implement
+        lang_hooks for the C++ front end.
+        * objc/objc-act.c (objc_post_options, lang_hooks): Implement
+        lang_hooks for the ObjC front end.
+        * f/com.c (lang_hooks): Hooks for the Fortran front end.
+        * java/lang.c (lang_hooks): Hooks for the Java front end.
+
 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
 
         * c-lex.c (init_c_lex): Request #define / #undef callbacks
index b96895d4c87f8a226a996930712ce4c2db853fc1..52f6015a49f91766c51fee686b27d36811efe6fa 100644 (file)
@@ -38,10 +38,19 @@ Boston, MA 02111-1307, USA.  */
 
 static int c_tree_printer PARAMS ((output_buffer *));
 static int c_missing_noreturn_ok_p PARAMS ((tree));
+static void c_post_options PARAMS ((void));
+
+/* Each front end provides its own.  */
+struct lang_hooks lang_hooks = {c_post_options};
+
+/* Post-switch processing.  */
+static void
+c_post_options ()
+{
+}
 
 /* Each of the functions defined here
    is an alternative to a function in objc-actions.c.  */
-
 int
 lang_decode_option (argc, argv)
      int argc;
index 1a38f4488ffcb87ab9df93a946a62e48f7bc4dd0..4daf5909d8b00ff67e7172867fd5795b2d4f8785 100644 (file)
@@ -59,6 +59,7 @@ typedef struct priority_info_s {
   int destructions_p;
 } *priority_info;
 
+static void cxx_post_options PARAMS ((void));
 static void mark_vtable_entries PARAMS ((tree));
 static void grok_function_init PARAMS ((tree, tree));
 static int finish_vtable_vardecl PARAMS ((tree *, void *));
@@ -543,6 +544,15 @@ static const char * const unsupported_options[] = {
   "strict-prototype",
 };
 
+/* Each front end provides its own.  */
+struct lang_hooks lang_hooks = {cxx_post_options};
+
+/* Post-switch processing.  */
+static void
+cxx_post_options ()
+{
+}
+
 /* Compare two option strings, pointed two by P1 and P2, for use with
    bsearch.  */
 
index 40d511664e4af9bd8fb32d1d0488d32cbb60f4cd..f6f80e03bace7636d9566cc41791837bf7d7ca41 100644 (file)
@@ -14676,6 +14676,9 @@ insert_block (block)
     = chainon (current_binding_level->blocks, block);
 }
 
+/* Each front end provides its own.  */
+struct lang_hooks lang_hooks = {NULL /* post_options */};
+
 int
 lang_decode_option (argc, argv)
      int argc;
index 7565eba9e24198ed65f9d68cd2ac4b6edfda34f2..3a9f34509dd682069cd6d00f9d05ee81098afb05 100644 (file)
@@ -186,6 +186,9 @@ static int dependency_tracking = 0;
 #define DEPEND_TARGET_SET 4
 #define DEPEND_FILE_ALREADY_SET 8
 
+/* Each front end provides its own.  */
+struct lang_hooks lang_hooks = {NULL /* post_options */};
+
 /* Process an option that can accept a `no-' form.
    Return 1 if option found, 0 otherwise.  */
 static int
index 99f2d23055c0d05d85b60158a86492ec45a0c110..06b0e8cbcf3d01f384f822e271dedf25342152ff 100644 (file)
@@ -148,6 +148,7 @@ char *util_firstobj;
 
 static void init_objc                          PARAMS ((void));
 static void finish_objc                                PARAMS ((void));
+static void objc_post_options                  PARAMS ((void));
 
 /* Code generation.  */
 
@@ -626,6 +627,15 @@ static int generating_instance_variables = 0;
 
 static int print_struct_values = 0;
 
+/* Each front end provides its own.  */
+struct lang_hooks lang_hooks = {objc_post_options};
+
+/* Post-switch processing.  */
+static void
+objc_post_options ()
+{
+}
+
 /* Some platforms pass small structures through registers versus through
    an invisible pointer.  Determine at what size structure is the 
    transition point between the two possibilities. */
index 160813710058ed20728728b113feb8a8fce6225a..0d51302471f5295b335fbabf0c49b02755fc2d8f 100644 (file)
@@ -4750,6 +4750,10 @@ main (argc, argv)
        }
     }
 
+  /* All command line options have been processed.  */
+  if (lang_hooks.post_options)
+    (*lang_hooks.post_options) ();
+
   /* Reflect any language-specific diagnostic option setting.  */
   reshape_diagnostic_buffer ();
 
index 4e029c0861fe54749988bc58a53f297c568a8e74..05fca0103a1b7fbb9df26c0aa4429e330c5672ca 100644 (file)
@@ -133,4 +133,14 @@ extern int sorrycount;
 
 extern const char *progname;
 
+/* Language-specific hooks.  */
+struct lang_hooks
+{
+  /* If non-NULL, called when all command line options have been processed.  */
+  void (*post_options) PARAMS ((void));
+};
+
+/* Each front end provides its own.  */
+extern struct lang_hooks lang_hooks;
+
 #endif /* __GCC_TOPLEV_H */