]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-common.h: Prototype min_precision and c_build_qualified_type here...
authorZack Weinberg <zack@wolery.cumb.org>
Wed, 2 Aug 2000 17:01:13 +0000 (17:01 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Wed, 2 Aug 2000 17:01:13 +0000 (17:01 +0000)
* c-common.h: Prototype min_precision and c_build_qualified_type here...
* c-tree.h: ... not here.
* errors.h: Prototype fancy_abort.

* emit-rtl.c (gen_lowpart_common): Move variable 'c' into
HOST_BITS_PER_WIDE_INT == 64 ifdef block.
* regrename.c (regrename_optimize): Make control flow explicit.
(replace_reg_in_block): Initialize reg_use to 0.

* i386.c (legitimate_address_p): Rename error label to
report_error to avoid namespace clash.

cp:
* cp-tree.h: Don't prototype min_precision here.
(my_friendly_assert): Cast expression to void.
* semantics.c (do_poplevel): Initialize scope_stmts.

f:
* expr.c (ffeexpr_finished_): Cast signed side of ?:
expression to bool.

java:
* class.c (build_dtable_decl): Initialize dummy.

intl:
* dcgettext.c (find_msg): Initialize act before loop.
(guess_category_value): Add dummy uses of both parameters.
* localealias.c (read_alias_file): Cast arg of strchr to char *.

From-SVN: r35427

17 files changed:
gcc/ChangeLog
gcc/c-common.h
gcc/c-tree.h
gcc/config/i386/i386.c
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/semantics.c
gcc/emit-rtl.c
gcc/errors.h
gcc/f/ChangeLog
gcc/f/expr.c
gcc/intl/ChangeLog
gcc/intl/dcgettext.c
gcc/intl/localealias.c
gcc/java/ChangeLog
gcc/java/class.c
gcc/regrename.c

index 38eeb62314559cea1ff28fd73f9115a165d58566..5c7d740f5a3fbca7c1124df8c3d9f8bbf8cae403 100644 (file)
@@ -1,3 +1,17 @@
+2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
+
+       * c-common.h: Prototype min_precision and c_build_qualified_type here...
+       * c-tree.h: ... not here.
+       * errors.h: Prototype fancy_abort.
+
+       * emit-rtl.c (gen_lowpart_common): Move variable 'c' into
+       HOST_BITS_PER_WIDE_INT == 64 ifdef block.
+       * regrename.c (regrename_optimize): Make control flow explicit.
+       (replace_reg_in_block): Initialize reg_use to 0.
+
+       * i386.c (legitimate_address_p): Rename error label to
+       report_error to avoid namespace clash.
+
 2000-08-02  Kazu Hirata  <kazu@hxi.com>
 
        * fold-const.c: Fix formatting.
index ba5d0fad6121fbdd87fd467c1386db26c2c604db..a7675dda05fc71cb78b4970f5f3b56a0f59581e0 100644 (file)
@@ -260,6 +260,11 @@ extern tree truthvalue_conversion          PARAMS ((tree));
 extern tree type_for_mode                      PARAMS ((enum machine_mode, int));
 extern tree type_for_size                      PARAMS ((unsigned, int));
 
+extern unsigned int min_precision              PARAMS ((tree, int));
+
+/* Add qualifiers to a type, in the fashion for C.  */
+extern tree c_build_qualified_type              PARAMS ((tree, int));
+
 /* Build tree nodes and builtin functions common to both C and C++ language
    frontends.  */
 extern void c_common_nodes_and_builtins                PARAMS ((int, int, int));
index 0bb4efb710f326beb8068c04c4a47dcd96d6fe8a..21236078dc7875ff743b6075908f2a90dcce7def 100644 (file)
@@ -151,16 +151,12 @@ extern void c_parse_init                  PARAMS ((void));
 /* in c-aux-info.c */
 extern void gen_aux_info_record                 PARAMS ((tree, int, int, int));
 
-/* In c-common.c */
-extern unsigned int min_precision              PARAMS ((tree, int));
-
 /* in c-convert.c */
 extern tree convert                             PARAMS ((tree, tree));
 
 /* in c-decl.c */
 extern tree build_enumerator                    PARAMS ((tree, tree));
-/* Add qualifiers to a type, in the fashion for C.  */
-extern tree c_build_qualified_type              PARAMS ((tree, int));
+
 #define c_build_type_variant(TYPE, CONST_P, VOLATILE_P)                  \
   c_build_qualified_type (TYPE,                                  \
                          ((CONST_P) ? TYPE_QUAL_CONST : 0) |     \
index 68a78e933145bcb9065a90f7b0835cead6b877c3..e8e984a8f38925ee36fc8cb351465e373d36e80d 100644 (file)
@@ -2396,7 +2396,7 @@ legitimate_address_p (mode, addr, strict)
   if (! ix86_decompose_address (addr, &parts))
     {
       reason = "decomposition failed";
-      goto error;
+      goto report_error;
     }
 
   base = parts.base;
@@ -2417,20 +2417,20 @@ legitimate_address_p (mode, addr, strict)
       if (GET_CODE (base) != REG)
        {
          reason = "base is not a register";
-         goto error;
+         goto report_error;
        }
 
       if (GET_MODE (base) != Pmode)
        {
          reason = "base is not in Pmode";
-         goto error;
+         goto report_error;
        }
 
       if ((strict && ! REG_OK_FOR_BASE_STRICT_P (base))
          || (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (base)))
        {
          reason = "base is not valid";
-         goto error;
+         goto report_error;
        }
     }
 
@@ -2447,20 +2447,20 @@ legitimate_address_p (mode, addr, strict)
       if (GET_CODE (index) != REG)
        {
          reason = "index is not a register";
-         goto error;
+         goto report_error;
        }
 
       if (GET_MODE (index) != Pmode)
        {
          reason = "index is not in Pmode";
-         goto error;
+         goto report_error;
        }
 
       if ((strict && ! REG_OK_FOR_INDEX_STRICT_P (index))
          || (! strict && ! REG_OK_FOR_INDEX_NONSTRICT_P (index)))
        {
          reason = "index is not valid";
-         goto error;
+         goto report_error;
        }
     }
 
@@ -2471,13 +2471,13 @@ legitimate_address_p (mode, addr, strict)
       if (!index)
        {
          reason = "scale without index";
-         goto error;
+         goto report_error;
        }
 
       if (scale != 2 && scale != 4 && scale != 8)
        {
          reason = "scale is not a valid multiplier";
-         goto error;
+         goto report_error;
        }
     }
 
@@ -2489,13 +2489,13 @@ legitimate_address_p (mode, addr, strict)
       if (!CONSTANT_ADDRESS_P (disp))
        {
          reason = "displacement is not constant";
-         goto error;
+         goto report_error;
        }
 
       if (GET_CODE (disp) == CONST_DOUBLE)
        {
          reason = "displacement is a const_double";
-         goto error;
+         goto report_error;
        }
 
       if (flag_pic && SYMBOLIC_CONST (disp))
@@ -2503,7 +2503,7 @@ legitimate_address_p (mode, addr, strict)
          if (! legitimate_pic_address_disp_p (disp))
            {
              reason = "displacement is an invalid pic construct";
-             goto error;
+             goto report_error;
            }
 
           /* This code used to verify that a symbolic pic displacement
@@ -2519,7 +2519,7 @@ legitimate_address_p (mode, addr, strict)
                 return *(&a+i);
               }
 
-            This code nonsential, but results in addressing
+            This code is nonsensical, but results in addressing
             GOT table with pic_offset_table_rtx base.  We can't
             just refuse it easilly, since it gets matched by
             "addsi3" pattern, that later gets split to lea in the
@@ -2534,7 +2534,7 @@ legitimate_address_p (mode, addr, strict)
              || (base != NULL_RTX || index != NULL_RTX))
            {
              reason = "displacement is an invalid half-pic reference";
-             goto error;
+             goto report_error;
            }
        }
     }
@@ -2544,7 +2544,7 @@ legitimate_address_p (mode, addr, strict)
     fprintf (stderr, "Success.\n");
   return TRUE;
 
-error:
+report_error:
   if (TARGET_DEBUG_ADDR)
     {
       fprintf (stderr, "Error: %s\n", reason);
index 12becdbcaf0e49aa75c707e479d119f208af15b3..84b1cab45a99c0c2f1f51cf6ffe1cf3da984b166 100644 (file)
@@ -1,3 +1,9 @@
+2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
+
+       * cp-tree.h: Don't prototype min_precision here.
+       (my_friendly_assert): Cast expression to void.
+       * semantics.c (do_poplevel): Initialize scope_stmts.
+
 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
 
        * cp-tree.h (DECL_NEEDED_P): Tweak.
index d949fcb70c648bd281dbf72045f7c50f1f4ab28a..ec2646c806f83264d78074dddceb4fe8b6c800a5 100644 (file)
@@ -3246,7 +3246,6 @@ extern tree convert_and_check                     PARAMS ((tree, tree));
 extern void overflow_warning                   PARAMS ((tree));
 extern void unsigned_conversion_warning                PARAMS ((tree, tree));
 extern void c_apply_type_quals_to_decl          PARAMS ((int, tree));
-extern unsigned int min_precision              PARAMS ((tree, int));
 
 /* Read the rest of the current #-directive line.  */
 #if USE_CPPLIB
@@ -4628,7 +4627,7 @@ extern void friendly_abort                        PARAMS ((int, const char *,
 
 #define my_friendly_abort(N) \
   friendly_abort (N, __FILE__, __LINE__, __FUNCTION__)
-#define my_friendly_assert(EXP, N) \
+#define my_friendly_assert(EXP, N) (void) \
  (((EXP) == 0) ? (friendly_abort (N, __FILE__, __LINE__, __FUNCTION__), 0) : 0)
 
 extern tree store_init_value                   PARAMS ((tree, tree));
index f8d39bff600b2263b0c4247598899e8bb2fad331..066f6756b679e1b3f2665e0781d40ca21c2f7085 100644 (file)
@@ -140,7 +140,7 @@ do_poplevel ()
 
   if (stmts_are_full_exprs_p ())
     {
-      tree scope_stmts;
+      tree scope_stmts = NULL_TREE;
 
       if (!processing_template_decl)
        scope_stmts = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0);
index 440009ba237152c57e6761cc66cf74ebec03edc0..122c58570eae4af438cd077a73511ad54873f284 100644 (file)
@@ -931,7 +931,6 @@ gen_lowpart_common (mode, x)
       REAL_VALUE_TYPE r;
       long i[4];  /* Only the low 32 bits of each 'long' are used.  */
       int endian = WORDS_BIG_ENDIAN ? 1 : 0;
-      int c;
 
       REAL_VALUE_FROM_CONST_DOUBLE (r, x);
       switch (GET_MODE (x))
@@ -959,16 +958,20 @@ gen_lowpart_common (mode, x)
 #if HOST_BITS_PER_WIDE_INT == 32
       return immed_double_const (i[endian], i[1-endian], mode);
 #else
-      if (HOST_BITS_PER_WIDE_INT != 64)
-       abort();
-      for (c = 0; c < 4; c++)
-       i[c] &= 0xffffffffL;
+      {
+       int c;
+
+       if (HOST_BITS_PER_WIDE_INT != 64)
+         abort();
+       for (c = 0; c < 4; c++)
+         i[c] &= 0xffffffffL;
       
-      return immed_double_const (i[endian*3] | 
-                                (((HOST_WIDE_INT) i[1+endian]) << 32),
-                                i[2-endian] |
-                                (((HOST_WIDE_INT) i[3-endian*3]) << 32),
-                                mode);
+       return immed_double_const (i[endian*3] | 
+                                  (((HOST_WIDE_INT) i[1+endian]) << 32),
+                                  i[2-endian] |
+                                  (((HOST_WIDE_INT) i[3-endian*3]) << 32),
+                                  mode);
+      }
 #endif
     }
 #endif /* ifndef REAL_ARITHMETIC */
index 843c1c879f6610049073a15565e256687e7bcfff..e782d2012afc205658f5d220ef2259d4f5e979d4 100644 (file)
@@ -29,6 +29,8 @@ extern void warning PARAMS ((const char *format, ...)) ATTRIBUTE_PRINTF_1;
 extern void error   PARAMS ((const char *format, ...)) ATTRIBUTE_PRINTF_1;
 extern void fatal   PARAMS ((const char *format, ...))
     ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+extern void fancy_abort PARAMS ((const char *file, int line, const char *func))
+    ATTRIBUTE_NORETURN;
 
 extern int have_error;
 extern const char *progname;
index e79c92d2960bcddc04329db2b2af7e710fe35a28..504d5cb6b9695218fb02e27d83bd27c4a353c02f 100644 (file)
@@ -1,3 +1,8 @@
+2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
+
+       * expr.c (ffeexpr_finished_): Cast signed side of ?:
+       expression to bool.
+
 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
 
        * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
index 82b9f47bc5920ccd7fedcce6c952f71ebfa0c5cd..2a46a9dbddb04636554beb9b88f0024c81baecee 100644 (file)
@@ -13162,7 +13162,7 @@ again:                          /* :::::::::::::::::::: */
          error = (expr == NULL)
            || ((ffeinfo_rank (info) != 0) ?
                ffe_is_pedantic ()      /* F77 C5. */
-               : (ffeinfo_kindtype (info) != ffecom_label_kind ()))
+               : (bool) (ffeinfo_kindtype (info) != ffecom_label_kind ()))
            || (ffebld_op (expr) != FFEBLD_opSYMTER);
          break;
 
index 00452d85c6fc69443eb482d957438de8e17a30a7..48d0d7069acd975e2faeca18c8968f249a861aab 100644 (file)
@@ -1,4 +1,11 @@
+2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
+
+       * dcgettext.c (find_msg): Initialize act before loop.
+       (guess_category_value): Add dummy uses of both parameters.
+       * localealias.c (read_alias_file): Cast arg of strchr to char *.
+
 2000-06-06  Philipp Thomas  <pthomas@suse.de>
+
        * Makefile.in: Add -DIN_GCC to DEFS, add appropriate -I switches.
        * dcgettext.c: Define _GNU_SOURCE before any system header is
        included. Guard getcwd declaration with HAVE_DECL_GETCWD.
index 4399b717d541984ce7f7436e22dad21f8670339e..a830f1de12425db91fc2c584235cb435de4bc35b 100644 (file)
@@ -455,6 +455,7 @@ find_msg (domain_file, msgid)
   /* Now we try the default method:  binary search in the sorted
      array of messages.  */
   bottom = 0;
+  act = 0;
   top = domain->nstrings;
   while (bottom < top)
     {
@@ -547,6 +548,8 @@ guess_category_value (category, categoryname)
      const char *categoryname;
 {
   const char *retval;
+  (void) category;  /* shut up compiler */
+  (void) categoryname;  /* ditto */
 
   /* The highest priority value is the `LANGUAGE' environment
      variable.  This is a GNU extension.  */
index 7c2f6ccb4ce32e4466b011048ed705a2e169d175..513cdc78e39c3de38f1c180f32dc1bfb83f4d4c1 100644 (file)
@@ -257,7 +257,7 @@ read_alias_file (fname, fname_len)
 
       /* Possibly not the whole line fits into the buffer.  Ignore
         the rest of the line.  */
-      if (strchr (buf, '\n') == NULL)
+      if (strchr ((char *)buf, '\n') == NULL)
        {
          char altbuf[BUFSIZ];
          do
index 9c7c1e4a2f7c049b7d785f1831d91a88ae2d3bbf..26762bdf51adc10d8508b127aeb84075505cfcdc 100644 (file)
@@ -1,3 +1,7 @@
+2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
+
+       * class.c (build_dtable_decl): Initialize dummy.
+
 2000-07-27  Tom Tromey  <tromey@cygnus.com>
             Anthony Green  <green@cygnus.com>
            Alexandre Petit-Bianco  <apbianco@cygnus.com>
index a291c5723a9b91c0b4556b8fb0ec142babe972a2..7cd6e666ac007cbe3c48d4982be91090ce4cecd9 100644 (file)
@@ -1698,7 +1698,7 @@ build_dtable_decl (type)
      TYPE. */
   if (current_class == type)
     {
-      tree dummy, aomt, n;
+      tree dummy = NULL_TREE, aomt, n;
 
       dtype = make_node (RECORD_TYPE);
       PUSH_FIELD (dtype, dummy, "class", class_ptr_type);
index 5f41f6bba0cb481313ea4c4165053bc79ed021eb..b29046bffefc4abfebc37656a6934bca829a46b6 100644 (file)
@@ -347,32 +347,26 @@ regrename_optimize ()
                        if (consider_available (reg_use, avail_reg,
                                                &avail_regs, rc, &du,
                                                def_idx[def]))
-                         break;
+                         goto found_avail_reg;
                      }
 
-                   if (ar_idx == FIRST_PSEUDO_REGISTER)
+                   if (rtl_dump_file)
                      {
-                       if (rtl_dump_file)
-                         {
-                           fprintf (rtl_dump_file,
-                                    "Register %s in class %s",
-                                    reg_names[r], reg_class_names[rc]);
-                           fprintf (rtl_dump_file,
-                                    " in insn %d",
-                                    INSN_UID (VARRAY_RTX (uid_ruid,
-                                                          def_idx[def])));
-
-                           if (TEST_BIT (du.require_call_save_reg,
-                                         def_idx[def]))
-                             fprintf (rtl_dump_file, " crosses a call");
+                       fprintf (rtl_dump_file, "Register %s in class %s",
+                                reg_names[r], reg_class_names[rc]);
+                       fprintf (rtl_dump_file, " in insn %d",
+                                INSN_UID (VARRAY_RTX (uid_ruid,
+                                                      def_idx[def])));
 
-                           fprintf (rtl_dump_file,
-                                    ". No available registers\n");
-                         }
+                       if (TEST_BIT (du.require_call_save_reg,
+                                     def_idx[def]))
+                         fprintf (rtl_dump_file, " crosses a call");
 
-                       goto try_next_def;
+                       fprintf (rtl_dump_file, ". No available registers\n");
                      }
+                   goto try_next_def;
 
+                 found_avail_reg:
                    SET_HARD_REG_BIT (renamed_regs, avail_reg);
                    CLEAR_HARD_REG_BIT (avail_regs, avail_reg);
 
@@ -530,7 +524,7 @@ replace_reg_in_block (du, uid_ruid, def, reg_def, avail_reg)
   unsigned int r = REGNO (reg_def);
   rtx death_note;
   rtx reg_notes;
-  rtx reg_use;
+  rtx reg_use = 0;
   rtx new_reg = gen_rtx_REG (GET_MODE (reg_def), avail_reg);
 
   rr_replace_reg (PATTERN (VARRAY_RTX (*uid_ruid, def)), reg_def, new_reg,