OSDN Git Service

Correct test results for avoid-bool-define fix
[pf3gnuchains/gcc-fork.git] / gcc / c-lang.c
index b96895d..cb60002 100644 (file)
@@ -38,36 +38,46 @@ Boston, MA 02111-1307, USA.  */
 
 static int c_tree_printer PARAMS ((output_buffer *));
 static int c_missing_noreturn_ok_p PARAMS ((tree));
-
-/* Each of the functions defined here
-   is an alternative to a function in objc-actions.c.  */
-
-int
-lang_decode_option (argc, argv)
-     int argc;
-     char **argv;
+static void c_init PARAMS ((void));
+static void c_init_options PARAMS ((void));
+static void c_post_options PARAMS ((void));
+
+/* Each front end provides its own.  */
+struct lang_hooks lang_hooks = {c_init,
+                               NULL, /* c_finish */
+                               c_init_options,
+                               c_decode_option,
+                               c_post_options};
+
+/* Post-switch processing.  */
+static void
+c_post_options ()
 {
-  return c_decode_option (argc, argv);
+  cpp_post_options (parse_in);
 }
 
-void
-lang_init_options ()
+static void
+c_init_options ()
 {
-  parse_in = cpp_create_reader (CLK_GNUC89);
+  /* Make identifier nodes long enough for the language-specific slots.  */
+  set_identifier_size (sizeof (struct lang_identifier));
+
+  parse_in = cpp_create_reader (ident_hash, CLK_GNUC89);
 
   /* Mark as "unspecified".  */
   flag_bounds_check = -1;
 }
 
-void
-lang_init ()
+static void
+c_init ()
 {
   c_common_lang_init ();
 
-  /* If still unspecified, make it match pedantic && -std=c99.  */
+  /* If still unspecified, make it match -std=c99
+     (allowing for -pedantic-errors).  */
   if (mesg_implicit_function_declaration < 0)
     {
-      if (pedantic && flag_isoc99)
+      if (flag_isoc99)
        mesg_implicit_function_declaration = flag_pedantic_errors ? 2 : 1;
       else
        mesg_implicit_function_declaration = 0;
@@ -85,11 +95,6 @@ lang_init ()
   c_parse_init ();
 }
 
-void
-lang_finish ()
-{
-}
-
 const char *
 lang_identify ()
 {
@@ -143,13 +148,6 @@ maybe_objc_comptypes (lhs, rhs, reflexive)
 }
 
 tree
-maybe_objc_method_name (decl)
-    tree decl ATTRIBUTE_UNUSED;
-{
-  return 0;
-}
-
-tree
 maybe_building_objc_message_expr ()
 {
   return 0;
@@ -186,10 +184,9 @@ start_cdtor (method_type)
   tree body;
 
   start_function (void_list_node_1,
-                 build_parse_node (CALL_EXPR, fnname,
-                                   tree_cons (NULL_TREE, NULL_TREE,
-                                              void_list_node_1),
-                                   NULL_TREE),
+                 build_nt (CALL_EXPR, fnname,
+                           tree_cons (NULL_TREE, NULL_TREE, void_list_node_1),
+                           NULL_TREE),
                  NULL_TREE, NULL_TREE);
   store_parm_decls ();