OSDN Git Service

(c_sizeof, build_c_cast): Set TREE_OVERFLOW in addition
[pf3gnuchains/gcc-fork.git] / gcc / toplev.c
index 104cc3a..05fef4d 100644 (file)
@@ -1,5 +1,5 @@
 /* Top level of GNU C compiler
-   Copyright (C) 1987, 1988, 1989, 1992 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -298,7 +298,7 @@ int flag_force_addr = 0;
 /* Nonzero for -fdefer-pop: don't pop args after each function call;
    instead save them up to pop many calls' args with one insns.  */
 
-int flag_defer_pop = 1;
+int flag_defer_pop = 0;
 
 /* Nonzero for -ffloat-store: don't allocate floats and doubles
    in extended-precision registers.  */
@@ -545,6 +545,8 @@ char *lang_options[] =
   "-fno-builtin",
   "-fno-ident",
   "-fident",
+  "-fdollars-in-identifiers",
+  "-fnodollars-in-identifiers",
   "-ansi",
   "-Wimplicit",
   "-Wno-implicit",
@@ -580,6 +582,8 @@ char *lang_options[] =
   "-Wno-trigraphs",
   "-Wimport",
   "-Wno-import",
+  "-Wmissing-braces",
+  "-Wno-missing-braces",
   "-Wall",
 
   /* These are for C++.  */
@@ -626,6 +630,8 @@ char *lang_options[] =
   "-fno-nonnull-objects",
   "-fimplement-inlines",
   "-fno-implement-inlines",
+  "-fexternal-templates",
+  "-fno-external-templates",
 
   "-Wreturn-type",
   "-Wno-return-type",
@@ -635,12 +641,20 @@ char *lang_options[] =
   "-Wno-enum-clash",
   "-Wtemplate-debugging",
   "-Wno-template-debugging",
+  "-Wctor-dtor-privacy",
+  "-Wno-ctor-dtor-privacy",
 
   /* these are for obj c */
   "-lang-objc",
   "-gen-decls",
+  "-fgnu-runtime",
+  "-fno-gnu-runtime",
+  "-fnext-runtime",
+  "-fno-next-runtime",
   "-Wselector",
   "-Wno-selector",
+  "-Wprotocol",
+  "-Wno-protocol",
   0
 };
 \f
@@ -994,7 +1008,7 @@ report_error_function (file)
        {
          fprintf (stderr, " from %s:%d", p->name, p->line);
          if (p->next)
-           fprintf (stderr, ",");
+           fprintf (stderr, ",\n                ");
        }
       fprintf (stderr, ":\n");
       last_error_tick = input_file_stack_tick;
@@ -1467,6 +1481,8 @@ strip_off_ending (name, len)
     name[len - 2] = 0;
   else if (len > 4 && ! strcmp (".ada", name + len - 4))
     name[len - 4] = 0;
+  else if (len > 4 && ! strcmp (".atr", name + len - 4))
+    name[len - 4] = 0;
 }
 
 /* Output a file name in the form wanted by System V.  */
@@ -1809,6 +1825,16 @@ compile_file (name)
   ASM_IDENTIFY_LANGUAGE (asm_out_file);
 #endif
 
+/* ??? Note: There used to be a conditional here
+   to call assemble_zeros without fail if DBX_DEBUGGING_INFO is defined.
+   This was to guarantee separation between gcc_compiled. and
+   the first function, for the sake of dbx on Suns.
+   However, having the extra zero here confused the Emacs
+   code for unexec, and might confuse other programs too.
+   Therefore, I took out that change.
+   In future versions we should find another way to solve
+   that dbx problem.  -- rms, 23 May 93.  */
+
   /* Don't let the first function fall at the same address
      as gcc_compiled., if profiling.  */
   if (profile_flag || profile_block_flag)
@@ -1873,7 +1899,8 @@ compile_file (name)
     for (i = 0; i < len; i++)
       {
        decl = vec[i];
-       if (DECL_SIZE (decl) == 0)
+       if (TREE_CODE (decl) == VAR_DECL && DECL_SIZE (decl) == 0
+           && incomplete_decl_finalize_hook != 0)
          (*incomplete_decl_finalize_hook) (decl);
 
        if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
@@ -1903,7 +1930,11 @@ compile_file (name)
            && (TREE_ADDRESSABLE (decl)
                || TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (decl)))
            && ! DECL_EXTERNAL (decl))
-         output_inline_function (decl);
+         {
+           temporary_allocation ();
+           output_inline_function (decl);
+           permanent_allocation ();
+         }
 
        /* Warn about any function
           declared static but not defined.
@@ -1918,7 +1949,11 @@ compile_file (name)
            && DECL_EXTERNAL (decl)
            && ! TREE_PUBLIC (decl))
          {
-           pedwarn_with_decl (decl, 
+           /* This should be a pedwarn, except that there is
+              no easy way to prevent it from happening when the
+              name is used only inside a sizeof.
+              This at least avoids being incorrect.  */
+           warning_with_decl (decl, 
                               "`%s' declared `static' but never defined");
            /* This symbol is effectively an "extern" declaration now.  */
            TREE_PUBLIC (decl) = 1;
@@ -2821,7 +2856,9 @@ main (argc, argv, envp)
 
   signal (SIGFPE, float_signal);
 
+#ifdef SIGPIPE
   signal (SIGPIPE, pipe_closed);
+#endif
 
   decl_printable_name = decl_name;
   lang_expand_expr = (struct rtx_def *(*)()) do_abort;
@@ -2864,6 +2901,7 @@ main (argc, argv, envp)
 
   if (optimize >= 1)
     {
+      flag_defer_pop = 1;
       flag_thread_jumps = 1;
 #ifdef DELAY_SLOTS
       flag_delayed_branch = 1;
@@ -3287,6 +3325,15 @@ You Lose!  You must define PREFERRED_DEBUGGING_TYPE!
        warning ("-Wuninitialized is not supported without -O");
     }
 
+#if defined(DWARF_DEBUGGING_INFO)
+  if (write_symbols == DWARF_DEBUG
+      && strcmp (language_string, "GNU C++") == 0)
+    {
+      warning ("-g option not supported for C++ on SVR4 systems");
+      write_symbols = NO_DEBUG;
+    }
+#endif /* defined(DWARF_DEBUGGING_INFO) */
+
 #ifdef OVERRIDE_OPTIONS
   /* Some machines may reject certain combinations of options.  */
   OVERRIDE_OPTIONS;