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
+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
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;
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 *));
"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. */
= 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;
#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
static void init_objc PARAMS ((void));
static void finish_objc PARAMS ((void));
+static void objc_post_options PARAMS ((void));
/* Code generation. */
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. */
}
}
+ /* 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 ();
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 */