public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* RFA: More initialization cleanup
@ 2001-11-13 15:03 Neil Booth
  2001-11-14 12:34 ` Neil Booth
  2001-11-15 18:28 ` Richard Henderson
  0 siblings, 2 replies; 9+ messages in thread
From: Neil Booth @ 2001-11-13 15:03 UTC (permalink / raw)
  To: gcc-patches

In toplev.c, this ensures we get a correct error code on early exit
from e.g. --help (we may have had errors too), and more fully
documents some of the langhooks, and places them in a more natural
(chronological) order.  Also, removed a bunch of unwanted trailing
periods in diagnostics.

The rest is the beginning of an effort to clean up and share more code
between the 3 C front ends in c-common.c; starting with the
initialization code.  Objective C was already missing out on some
things because they'd been added to the C front end only; a notable
example was Alexandre's tree inlining stuff.  Indeed, the hooks for
tree inlining still need to be properly set up for Objective-C; that
will appear in a subsequent patch.

Bootstrapped C, OjbC, C++ on x86 Linux without regressions.  OK to
commit?

Neil.

	* c-common.c: Include tree-inline.h.
	(c_language): Move separate definitions here.
	(c_common_init_options, c_common_post_options): New.
	(c_common_lang_init): Rename c_common_init.
	* c-common.h (c_common_lang_init): Similarly.
	(c_common_init_options, c_common_post_options): New.
	* c-lang.c (c_post_options): Move body to c_common_post_options.
	(c_init_options): Use c_common_init_options.
	(c_init): Update.
	* langhooks.def: Rearrange.
	* langhooks.h: Rearrange, and improve comments.
	* toplev.c (do_compile): New function.
	(toplev_main): Use it.
	(lang_independent_f_options, parse_options_and_default_flags,
	process_options): Remove trailing periods.
	* Makefile.in: Update.
cp:	* decl2.c (c_language): Move to c-common.c.
	* lex.c (cxx_post_options, cxx_init_options): Use c-common.c
	functions.
	(cxx_init): Update.
objc:	* objc-act.c (objc_post_options, objc_init_options): Use c-common.c
	functions.
	(ojbc_init): Update.

============================================================
Index: gcc/c-common.c
--- gcc/c-common.c	2001/11/18 11:04:39	1.274
+++ gcc/c-common.c	2001/11/19 19:10:30
@@ -30,6 +30,7 @@ Software Foundation, 59 Temple Place - S
 #include "ggc.h"
 #include "expr.h"
 #include "c-common.h"
+#include "tree-inline.h"
 #include "diagnostic.h"
 #include "tm_p.h"
 #include "obstack.h"
@@ -79,6 +80,10 @@ cpp_reader *parse_in;		/* Declared in c-
 			: "long long unsigned int"))
 #endif
 
+/* The variant of the C language being processed.  */
+
+enum c_language_kind c_language;
+
 /* The following symbols are subsumed in the c_global_trees array, and
    listed here individually for documentation purposes.
 
@@ -2371,7 +2376,7 @@ c_common_nodes_and_builtins ()
   tree va_list_arg_type_node;
 
   /* We must initialize this before any builtin functions (which might have
-     attributes) are declared.  (c_common_lang_init is too late.)  */
+     attributes) are declared.  (c_common_init is too late.)  */
   format_attribute_table = c_format_attribute_table;
 
   /* Define `int' and `char' first so that dbx will output them first.  */
@@ -3858,17 +3863,43 @@ static bool c_attrs_initialized = false;
 
 static void c_init_attributes PARAMS ((void));
 
-/* Do the parts of lang_init common to C and C++.  */
-const char *
-c_common_lang_init (filename)
-     const char *filename;
+/* Common initialization before parsing options.  */
+void
+c_common_init_options (lang)
+     enum c_language_kind lang;
 {
-  filename = init_c_lex (filename);
+  c_language = lang;
+  parse_in = cpp_create_reader (lang == clk_c ? CLK_GNUC89:
+				lang == clk_cplusplus ? CLK_GNUCXX: CLK_OBJC);
 
-  init_pragma ();
+  /* Mark as "unspecified" (see c_common_post_options).  */
+  flag_bounds_check = -1;
+}
+
+/* Post-switch processing.  */
+void
+c_common_post_options ()
+{
+  cpp_post_options (parse_in);
+
+  /* Use tree inlining if possible.  Function instrumentation is only
+     done in the RTL level, so we disable tree inlining.  */
+  if (! flag_instrument_function_entry_exit)
+    {
+      if (!flag_no_inline)
+	{
+	  flag_inline_trees = 1;
+	  flag_no_inline = 1;
+	}
+      if (flag_inline_functions)
+	{
+	  flag_inline_trees = 2;
+	  flag_inline_functions = 0;
+	}
+    }
 
   /* If still "unspecified", make it match -fbounded-pointers.  */
-  if (flag_bounds_check < 0)
+  if (flag_bounds_check == -1)
     flag_bounds_check = flag_bounded_pointers;
 
   /* Special format checking options don't work without -Wformat; warn if
@@ -3883,6 +3914,18 @@ c_common_lang_init (filename)
     warning ("-Wformat-security ignored without -Wformat");
   if (warn_missing_format_attribute && !warn_format)
     warning ("-Wmissing-format-attribute ignored without -Wformat");
+}
+
+/* Front end initialization common to C, ObjC and C++.  */
+const char *
+c_common_init (filename)
+     const char *filename;
+{
+  /* Do this before initializing pragmas, as then cpplib's hash table
+     has been set up.  */
+  filename = init_c_lex (filename);
+
+  init_pragma ();
 
   if (!c_attrs_initialized)
     c_init_attributes ();
============================================================
Index: gcc/c-common.h
--- gcc/c-common.h	2001/11/18 11:04:40	1.98
+++ gcc/c-common.h	2001/11/19 19:10:31
@@ -542,7 +542,9 @@ extern void disable_builtin_function		PA
 
 extern tree build_va_arg			PARAMS ((tree, tree));
 
-extern const char *c_common_lang_init		PARAMS ((const char *));
+extern void c_common_init_options		PARAMS ((enum c_language_kind));
+extern void c_common_post_options		PARAMS ((void));
+extern const char *c_common_init		PARAMS ((const char *));
 extern void c_common_finish			PARAMS ((void));
 extern HOST_WIDE_INT c_common_get_alias_set	PARAMS ((tree));
 extern bool c_promoting_integer_type_p		PARAMS ((tree));
============================================================
Index: gcc/c-lang.c
--- gcc/c-lang.c	2001/11/19 11:28:47	1.67
+++ gcc/c-lang.c	2001/11/19 19:10:31
@@ -88,32 +88,13 @@ static varray_type deferred_fns;
 static void
 c_post_options ()
 {
-  cpp_post_options (parse_in);
-
-  /* Use tree inlining if possible.  Function instrumentation is only
-     done in the RTL level, so we disable tree inlining.  */
-  if (! flag_instrument_function_entry_exit)
-    {
-      if (!flag_no_inline)
-	{
-	  flag_inline_trees = 1;
-	  flag_no_inline = 1;
-	}
-      if (flag_inline_functions)
-	{
-	  flag_inline_trees = 2;
-	  flag_inline_functions = 0;
-	}
-    }
+  c_common_post_options ();
 }
 
 static void
 c_init_options ()
 {
-  parse_in = cpp_create_reader (CLK_GNUC89);
-
-  /* Mark as "unspecified".  */
-  flag_bounds_check = -1;
+  c_common_init_options (clk_c);
 }
 
 static const char *
@@ -122,7 +103,7 @@ c_init (filename)
 {
   c_init_decl_processing ();
 
-  filename = c_common_lang_init (filename);
+  filename = c_common_init (filename);
 
   add_c_tree_codes ();
 
============================================================
Index: gcc/langhooks-def.h
--- gcc/langhooks-def.h	2001/11/09 23:30:23	1.3
+++ gcc/langhooks-def.h	2001/11/19 19:10:32
@@ -107,12 +107,12 @@ int lhd_tree_inlining_anon_aggr_type_p		
 #define LANG_HOOKS_INITIALIZER { \
   LANG_HOOKS_NAME, \
   LANG_HOOKS_IDENTIFIER_SIZE, \
-  LANG_HOOKS_INIT, \
-  LANG_HOOKS_FINISH, \
-  LANG_HOOKS_CLEAR_BINDING_STACK, \
   LANG_HOOKS_INIT_OPTIONS, \
   LANG_HOOKS_DECODE_OPTION, \
   LANG_HOOKS_POST_OPTIONS, \
+  LANG_HOOKS_INIT, \
+  LANG_HOOKS_FINISH, \
+  LANG_HOOKS_CLEAR_BINDING_STACK, \
   LANG_HOOKS_GET_ALIAS_SET, \
   LANG_HOOKS_HONOR_READONLY, \
   LANG_HOOKS_PRINT_STATISTICS, \
============================================================
Index: gcc/langhooks.h
--- gcc/langhooks.h	2001/11/18 11:04:41	1.10
+++ gcc/langhooks.h	2001/11/19 19:10:32
@@ -59,21 +59,8 @@ struct lang_hooks
      identifier nodes long enough for the language-specific slots.  */
   size_t identifier_size;
 
-  /* Called after options parsing, to initialize the front end.  The
-     main input filename is passed, which may be NULL; the front end
-     should return the original filename (e.g. foo.i -> foo.c).
-     Return NULL to indicate a serious error of some sort; in that
-     case no compilation is performed, and the finish hook is called
-     immediately.  */
-  const char * (*init) PARAMS ((const char *));
-
-  /* Called last, as a finalizer.  */
-  void (*finish) PARAMS ((void));
-
-  /* Called immediately after parsing to clear the binding stack.  */
-  void (*clear_binding_stack) PARAMS ((void));
-
-  /* Called to initialize options, before any calls to decode_option.  */
+  /* The first callback made to the front end, for simple
+     initialization needed before any calls to decode_option.  */
   void (*init_options) PARAMS ((void));
 
   /* Function called with an option vector as argument, to decode a
@@ -86,8 +73,25 @@ struct lang_hooks
      done for this option.  */
   int (*decode_option) PARAMS ((int, char **));
 
-  /* Called when all command line options have been parsed.  */
+  /* Called when all command line options have been parsed.  Should do
+     any required consistency checks, modifications etc.  Complex
+     initialization should be left to the "init" callback, since GC
+     and the identifier hashes are set up between now and then.  */
   void (*post_options) PARAMS ((void));
+
+  /* Called after post_options, to initialize the front end.  The main
+     input filename is passed, which may be NULL; the front end should
+     return the original filename (e.g. foo.i -> foo.c).  Return NULL
+     to indicate a serious error of some sort; in that case no
+     compilation is performed, and the finish hook is called
+     immediately.  */
+  const char * (*init) PARAMS ((const char *));
+
+  /* Called at the end of compilation, as a finalizer.  */
+  void (*finish) PARAMS ((void));
+
+  /* Called immediately after parsing to clear the binding stack.  */
+  void (*clear_binding_stack) PARAMS ((void));
 
   /* Called to obtain the alias set to be used for an expression or type.
      Returns -1 if the language does nothing special for it.  */
============================================================
Index: gcc/toplev.c
--- gcc/toplev.c	2001/11/18 11:04:41	1.540
+++ gcc/toplev.c	2001/11/19 19:10:45
@@ -163,6 +163,7 @@ extern tree last_assemble_variable_decl;
 
 static void general_init PARAMS ((char *));
 static void parse_options_and_default_flags PARAMS ((int, char **));
+static void do_compile PARAMS ((void));
 static void process_options PARAMS ((void));
 static void lang_independent_init PARAMS ((void));
 static int lang_dependent_init PARAMS ((const char *));
@@ -1209,7 +1210,7 @@ lang_independent_options f_options[] =
   {"mem-report", &mem_report, 1,
    N_("Report on permanent memory allocation at end of run") },
   { "trapv", &flag_trapv, 1,
-   N_("Trap for signed overflow in addition / subtraction / multiplication.") },
+   N_("Trap for signed overflow in addition / subtraction / multiplication") },
 };
 
 /* Table of language-specific options.  */
@@ -4819,7 +4820,8 @@ parse_options_and_default_flags (argc, a
 	}
     }
 
-  /* All command line options have been processed.  */
+  /* All command line options have been parsed; allow the front end to
+     perform consistency checks, etc.  */
   (*lang_hooks.post_options) ();
 }
 \f
@@ -4875,7 +4877,7 @@ process_options ()
 
   if (profile_block_flag == 3)
     {
-      warning ("`-ax' and `-a' are conflicting options. `-a' ignored.");
+      warning ("`-ax' and `-a' are conflicting options. `-a' ignored");
       profile_block_flag = 2;
     }
 
@@ -4989,12 +4991,12 @@ process_options ()
     {
       if (flag_function_sections)
 	{
-	  warning ("-ffunction-sections not supported for this target.");
+	  warning ("-ffunction-sections not supported for this target");
 	  flag_function_sections = 0;
 	}
       if (flag_data_sections)
 	{
-	  warning ("-fdata-sections not supported for this target.");
+	  warning ("-fdata-sections not supported for this target");
 	  flag_data_sections = 0;
 	}
     }
@@ -5002,13 +5004,13 @@ process_options ()
   if (flag_function_sections
       && (profile_flag || profile_block_flag))
     {
-      warning ("-ffunction-sections disabled; it makes profiling impossible.");
+      warning ("-ffunction-sections disabled; it makes profiling impossible");
       flag_function_sections = 0;
     }
 
 #ifndef OBJECT_FORMAT_ELF
   if (flag_function_sections && write_symbols != NO_DEBUG)
-    warning ("-ffunction-sections may affect debugging on some targets.");
+    warning ("-ffunction-sections may affect debugging on some targets");
 #endif
 }
 \f
@@ -5165,29 +5167,10 @@ finalize ()
   (*lang_hooks.finish) ();
 }
 \f
-/* Entry point of cc1, cc1plus, jc1, f771, etc.
-   Decode command args, then call compile_file.
-   Exit code is FATAL_EXIT_CODE if can't open files or if there were
-   any errors, or SUCCESS_EXIT_CODE if compilation succeeded.
-
-   It is not safe to call this function more than once.  */
-
-int
-toplev_main (argc, argv)
-     int argc;
-     char **argv;
+/* Initialize the compiler, and compile the input file.  */
+static void
+do_compile ()
 {
-  /* Initialization of GCC's environment, and diagnostics.  */
-  general_init (argv [0]);
-
-  /* Parse the options and do minimal processing; basically just
-     enough to default flags appropriately.  */
-  parse_options_and_default_flags (argc, argv);
-
-  /* Exit early if we can (e.g. -help).  */
-  if (exit_after_options)
-    return (SUCCESS_EXIT_CODE);
-
   /* The bulk of command line switch processing.  */
   process_options ();
 
@@ -5209,6 +5192,30 @@ toplev_main (argc, argv)
   /* Stop timing and print the times.  */
   timevar_stop (TV_TOTAL);
   timevar_print (stderr);
+}
+\f
+/* Entry point of cc1, cc1plus, jc1, f771, etc.
+   Decode command args, then call compile_file.
+   Exit code is FATAL_EXIT_CODE if can't open files or if there were
+   any errors, or SUCCESS_EXIT_CODE if compilation succeeded.
+
+   It is not safe to call this function more than once.  */
+
+int
+toplev_main (argc, argv)
+     int argc;
+     char **argv;
+{
+  /* Initialization of GCC's environment, and diagnostics.  */
+  general_init (argv [0]);
+
+  /* Parse the options and do minimal processing; basically just
+     enough to default flags appropriately.  */
+  parse_options_and_default_flags (argc, argv);
+
+  /* Exit early if we can (e.g. -help).  */
+  if (!exit_after_options)
+    do_compile ();
 
   if (errorcount || sorrycount)
     return (FATAL_EXIT_CODE);
============================================================
Index: gcc/Makefile.in
--- gcc/Makefile.in	2001/11/18 22:08:32	1.785
+++ gcc/Makefile.in	2001/11/19 19:10:58
@@ -1249,7 +1249,7 @@ s-under: $(GCC_PASSES)
 c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \
 	$(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
 	$(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def $(TARGET_H) \
-	diagnostic.h
+	diagnostic.h tree-inline.h
 
 # A file used by all variants of C and some other languages.
 
============================================================
Index: gcc/cp/decl2.c
--- gcc/cp/decl2.c	2001/10/28 19:24:59	1.499
+++ gcc/cp/decl2.c	2001/11/19 19:11:11
@@ -400,10 +400,6 @@ int flag_permissive;
 
 int flag_enforce_eh_specs = 1;
 
-/* The variant of the C language being processed.  */
-
-c_language_kind c_language = clk_cplusplus;
-
 /* Table of language-dependent -f options.
    STRING is the option name.  VARIABLE is the address of the variable.
    ON_VALUE is the value to store in VARIABLE
============================================================
Index: gcc/cp/lex.c
--- gcc/cp/lex.c	2001/11/18 11:04:45	1.257
+++ gcc/cp/lex.c	2001/11/19 19:11:15
@@ -241,18 +241,17 @@ static const char *const cplus_tree_code
 void
 cxx_post_options ()
 {
-  cpp_post_options (parse_in);
+  c_common_post_options ();
 }
 
+/* Initialization before switch parsing.  */
 void
 cxx_init_options ()
 {
-  parse_in = cpp_create_reader (CLK_GNUCXX);
+  c_common_init_options (clk_cplusplus);
 
   /* Default exceptions on.  */
   flag_exceptions = 1;
-  /* Mark as "unspecified".  */
-  flag_bounds_check = -1;
   /* By default wrap lines at 80 characters.  Is getenv ("COLUMNS")
      preferable?  */
   diagnostic_line_cutoff (global_dc) = 80;
@@ -720,10 +719,7 @@ cxx_init (filename)
 
   cxx_init_decl_processing ();
 
-  /* Create the built-in __null node.  Note that we can't yet call for
-     type_for_size here because integer_type_node and so forth are not
-     set up.  Therefore, we don't set the type of these nodes until
-     cxx_init_decl_processing.  */
+  /* Create the built-in __null node.  */
   null_node = build_int_2 (0, 0);
   TREE_TYPE (null_node) = type_for_size (POINTER_SIZE, 0);
   ridpointers[RID_NULL] = null_node;
@@ -731,7 +727,7 @@ cxx_init (filename)
   token_count = init_cpp_parse ();
   interface_unknown = 1;
 
-  filename = c_common_lang_init (filename);
+  filename = c_common_init (filename);
 
   init_cp_pragma ();
 
============================================================
Index: gcc/objc/objc-act.c
--- gcc/objc/objc-act.c	2001/11/18 11:04:53	1.106
+++ gcc/objc/objc-act.c	2001/11/19 19:11:29
@@ -478,7 +478,7 @@ static varray_type deferred_fns;
 static void
 objc_post_options ()
 {
-  cpp_post_options (parse_in);
+  c_common_post_options ();
 }
 
 /* Some platforms pass small structures through registers versus through
@@ -547,8 +547,7 @@ generate_struct_by_value_array ()
 static void
 objc_init_options ()
 {
-  parse_in = cpp_create_reader (CLK_OBJC);
-  c_language = clk_objective_c;
+  c_common_init_options (clk_objective_c);
 }
 
 static const char *
@@ -557,7 +556,7 @@ objc_init (filename)
 {
   c_init_decl_processing ();
 
-  filename = c_common_lang_init (filename);
+  filename = c_common_init (filename);
 
   add_c_tree_codes ();
 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFA: More initialization cleanup
  2001-11-13 15:03 RFA: More initialization cleanup Neil Booth
@ 2001-11-14 12:34 ` Neil Booth
  2001-11-24 13:42   ` Neil Booth
  2001-11-15 18:28 ` Richard Henderson
  1 sibling, 1 reply; 9+ messages in thread
From: Neil Booth @ 2001-11-14 12:34 UTC (permalink / raw)
  To: gcc-patches

Neil Booth wrote:-

> In toplev.c, this ensures we get a correct error code on early exit
> from e.g. --help (we may have had errors too), and more fully
> documents some of the langhooks, and places them in a more natural
> (chronological) order.  Also, removed a bunch of unwanted trailing
> periods in diagnostics.
> 
> The rest is the beginning of an effort to clean up and share more code
> between the 3 C front ends in c-common.c; starting with the
> initialization code.  Objective C was already missing out on some
> things because they'd been added to the C front end only; a notable
> example was Alexandre's tree inlining stuff.  Indeed, the hooks for
> tree inlining still need to be properly set up for Objective-C; that
> will appear in a subsequent patch.
> 
> Bootstrapped C, OjbC, C++ on x86 Linux without regressions.  OK to
> commit?

Would someone approve or reject this patch please?

http://gcc.gnu.org/ml/gcc-patches/2001-11/msg01276.html

Thanks,

Neil.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFA: More initialization cleanup
  2001-11-13 15:03 RFA: More initialization cleanup Neil Booth
  2001-11-14 12:34 ` Neil Booth
@ 2001-11-15 18:28 ` Richard Henderson
  2001-11-15 19:04   ` Neil Booth
  2001-11-26 12:58   ` Richard Henderson
  1 sibling, 2 replies; 9+ messages in thread
From: Richard Henderson @ 2001-11-15 18:28 UTC (permalink / raw)
  To: Neil Booth; +Cc: gcc-patches

On Mon, Nov 19, 2001 at 07:25:59PM +0000, Neil Booth wrote:
>  c_post_options ()
>  {
> +  c_common_post_options ();
>  }

Why bother with this function at all?  Just put c_common_post_options
as the language hook.  Likewise for the other languages.


Otherwise ok.


r~

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFA: More initialization cleanup
  2001-11-15 18:28 ` Richard Henderson
@ 2001-11-15 19:04   ` Neil Booth
  2001-11-16  2:39     ` Richard Henderson
  2001-11-26 13:12     ` Neil Booth
  2001-11-26 12:58   ` Richard Henderson
  1 sibling, 2 replies; 9+ messages in thread
From: Neil Booth @ 2001-11-15 19:04 UTC (permalink / raw)
  To: Richard Henderson, gcc-patches

Richard Henderson wrote:-

> On Mon, Nov 19, 2001 at 07:25:59PM +0000, Neil Booth wrote:
> >  c_post_options ()
> >  {
> > +  c_common_post_options ();
> >  }
> 
> Why bother with this function at all?  Just put c_common_post_options
> as the language hook.  Likewise for the other languages.

The main reason is it's really simple to add something to it, without
having the hassle of re-creating the hook.  Since there's no
bottleneck since it's only run once, I reckoned it was worth it.
Further, it looked like further cleaning up the C front-end
initialization would provide language-specific code for such places.
At present various code scattered randomly around makes initialization
decisions based on flags.

So OK to keep it?  When I've finished, if it remains trivial, I can
remove it if you like.

Neil.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFA: More initialization cleanup
  2001-11-15 19:04   ` Neil Booth
@ 2001-11-16  2:39     ` Richard Henderson
  2001-11-26 13:26       ` Richard Henderson
  2001-11-26 13:12     ` Neil Booth
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Henderson @ 2001-11-16  2:39 UTC (permalink / raw)
  To: Neil Booth; +Cc: gcc-patches

On Mon, Nov 26, 2001 at 09:13:31PM +0000, Neil Booth wrote:
> So OK to keep it?  When I've finished, if it remains trivial, I can
> remove it if you like.

Ok.


r~

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFA: More initialization cleanup
  2001-11-14 12:34 ` Neil Booth
@ 2001-11-24 13:42   ` Neil Booth
  0 siblings, 0 replies; 9+ messages in thread
From: Neil Booth @ 2001-11-24 13:42 UTC (permalink / raw)
  To: gcc-patches

Neil Booth wrote:-

> In toplev.c, this ensures we get a correct error code on early exit
> from e.g. --help (we may have had errors too), and more fully
> documents some of the langhooks, and places them in a more natural
> (chronological) order.  Also, removed a bunch of unwanted trailing
> periods in diagnostics.
> 
> The rest is the beginning of an effort to clean up and share more code
> between the 3 C front ends in c-common.c; starting with the
> initialization code.  Objective C was already missing out on some
> things because they'd been added to the C front end only; a notable
> example was Alexandre's tree inlining stuff.  Indeed, the hooks for
> tree inlining still need to be properly set up for Objective-C; that
> will appear in a subsequent patch.
> 
> Bootstrapped C, OjbC, C++ on x86 Linux without regressions.  OK to
> commit?

Would someone approve or reject this patch please?

http://gcc.gnu.org/ml/gcc-patches/2001-11/msg01276.html

Thanks,

Neil.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFA: More initialization cleanup
  2001-11-15 18:28 ` Richard Henderson
  2001-11-15 19:04   ` Neil Booth
@ 2001-11-26 12:58   ` Richard Henderson
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Henderson @ 2001-11-26 12:58 UTC (permalink / raw)
  To: Neil Booth; +Cc: gcc-patches

On Mon, Nov 19, 2001 at 07:25:59PM +0000, Neil Booth wrote:
>  c_post_options ()
>  {
> +  c_common_post_options ();
>  }

Why bother with this function at all?  Just put c_common_post_options
as the language hook.  Likewise for the other languages.


Otherwise ok.


r~

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFA: More initialization cleanup
  2001-11-15 19:04   ` Neil Booth
  2001-11-16  2:39     ` Richard Henderson
@ 2001-11-26 13:12     ` Neil Booth
  1 sibling, 0 replies; 9+ messages in thread
From: Neil Booth @ 2001-11-26 13:12 UTC (permalink / raw)
  To: Richard Henderson, gcc-patches

Richard Henderson wrote:-

> On Mon, Nov 19, 2001 at 07:25:59PM +0000, Neil Booth wrote:
> >  c_post_options ()
> >  {
> > +  c_common_post_options ();
> >  }
> 
> Why bother with this function at all?  Just put c_common_post_options
> as the language hook.  Likewise for the other languages.

The main reason is it's really simple to add something to it, without
having the hassle of re-creating the hook.  Since there's no
bottleneck since it's only run once, I reckoned it was worth it.
Further, it looked like further cleaning up the C front-end
initialization would provide language-specific code for such places.
At present various code scattered randomly around makes initialization
decisions based on flags.

So OK to keep it?  When I've finished, if it remains trivial, I can
remove it if you like.

Neil.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFA: More initialization cleanup
  2001-11-16  2:39     ` Richard Henderson
@ 2001-11-26 13:26       ` Richard Henderson
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Henderson @ 2001-11-26 13:26 UTC (permalink / raw)
  To: Neil Booth; +Cc: gcc-patches

On Mon, Nov 26, 2001 at 09:13:31PM +0000, Neil Booth wrote:
> So OK to keep it?  When I've finished, if it remains trivial, I can
> remove it if you like.

Ok.


r~

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-11-26 21:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-13 15:03 RFA: More initialization cleanup Neil Booth
2001-11-14 12:34 ` Neil Booth
2001-11-24 13:42   ` Neil Booth
2001-11-15 18:28 ` Richard Henderson
2001-11-15 19:04   ` Neil Booth
2001-11-16  2:39     ` Richard Henderson
2001-11-26 13:26       ` Richard Henderson
2001-11-26 13:12     ` Neil Booth
2001-11-26 12:58   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).