Warning fixes:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 30 Sep 1998 16:49:55 +0000 (16:49 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 30 Sep 1998 16:49:55 +0000 (16:49 +0000)
* actions.c (chill_handle_multi_case_label): Always return a value
in function returning non-void.
* except.c: Include OS headers before any local ones.
* typeck.c (layout_chill_range_type): Change type of variable
`negprecision' to int.
(apply_chill_array_layout): Initialize variables `stepsize' and
`start_bit'.
(layout_chill_struct_type): Change type of variable `min_align' to
unsigned int.
(smash_dummy_type): Change name of variable `main' to `main_tree'.

From-SVN: r22680

gcc/ch/ChangeLog
gcc/ch/actions.c
gcc/ch/except.c
gcc/ch/typeck.c

index 5eb5e1961cee57624648fd27265bb293262b41a3..ebada8729c46568a999432c8dbb8f5d8b9064ab7 100644 (file)
@@ -1,3 +1,18 @@
+Wed Sep 30 19:41:36 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * actions.c (chill_handle_multi_case_label): Always return a value
+       in function returning non-void. 
+
+       * except.c: Include OS headers before any local ones.
+
+       * typeck.c (layout_chill_range_type): Change type of variable
+       `negprecision' to int.
+       (apply_chill_array_layout): Initialize variables `stepsize' and
+       `start_bit'.
+       (layout_chill_struct_type): Change type of variable `min_align' to
+       unsigned int.
+       (smash_dummy_type): Change name of variable `main' to `main_tree'.
+
 Wed Sep 30 19:24:41 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * actions.c (id_cmp): Do pointer arithmetic as `long' not `int' to
index cd1c46ba2d3bcae46ec85775bafc9b95c8557da6..6d636b7052affd8aa5006a370dce0477ed79299b 100644 (file)
@@ -1229,7 +1229,7 @@ chill_handle_multi_case_label (selector, label)
   tree expr;
 
   if (label == NULL_TREE || TREE_CODE (label) == ERROR_MARK)
-    return;
+    return NULL_TREE;
 
   if (TREE_CODE (label) == INTEGER_CST)
     {
index 9312e02d88f2b6926f0f83ffa85523e04ba4f3fd..0a911bd5e07dcce14f2383eba10513fb14e9195e 100644 (file)
@@ -19,11 +19,7 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "config.h"
-#include "tree.h"
-#include "ch-tree.h"
-#include "rtl.h"
 #include "system.h"
-#include "toplev.h"
 
 /* On Suns this can get you to the right definition if you
    set the right value for TARGET.  */
@@ -52,6 +48,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #endif
 #endif
 
+#include "tree.h"
+#include "ch-tree.h"
+#include "rtl.h"
+#include "toplev.h"
+
 extern int  expand_exit_needed;
 
 static tree link_handler_decl;
index 45bf8df862aba11e39ebb32f3ea696ca2e6a9b79..a4795dfddf4019289f2e4a9a2c8b9a9b0a0d5bd0 100644 (file)
@@ -2597,7 +2597,7 @@ layout_chill_range_type (rangetype, must_be_const)
                  /* Compute number of bits to represent magnitude of a
                     negative value.  Add one to MINVALUE since range of
                     negative numbers includes the power of two.  */
-                 unsigned negprecision = floor_log2 (-minvalue - 1) + 1;
+                 int negprecision = floor_log2 (-minvalue - 1) + 1;
                  if (negprecision > precision)
                    precision = negprecision;
                  precision += 1;       /* room for sign bit */
@@ -2736,7 +2736,7 @@ apply_chill_array_layout (array_type)
      tree array_type;
 {
   tree layout, temp, what, element_type;
-  int stepsize, word, start_bit, length, natural_length;
+  int stepsize=0, word, start_bit=0, length, natural_length;
   int stepsize_specified;
   int start_bit_error = 0;
   int length_error = 0;
@@ -3243,7 +3243,7 @@ layout_chill_struct_type (t)
        }
       else
        {
-         int min_align = TYPE_ALIGN (TREE_TYPE (x));
+         unsigned int min_align = TYPE_ALIGN (TREE_TYPE (x));
          DECL_ALIGN (x) = MAX (DECL_ALIGN (x), min_align);
          was_pos = 0;
        }
@@ -3346,7 +3346,7 @@ smash_dummy_type (type)
 {
   /* Save fields that we don't want to copy from ORIGIN. */ 
   tree origin = TREE_TYPE (type);
-  tree main = TYPE_MAIN_VARIANT (origin);
+  tree main_tree = TYPE_MAIN_VARIANT (origin);
   int  save_uid = TYPE_UID (type);
   struct obstack *save_obstack = TYPE_OBSTACK (type);
   tree save_name = TYPE_NAME (type);
@@ -3439,8 +3439,8 @@ smash_dummy_type (type)
   if (save_readonly)
     { /* TYPE is READ ORIGIN.
         Add this type to the chain of variants of TYPE.  */
-      TYPE_NEXT_VARIANT (type) = TYPE_NEXT_VARIANT (main);
-      TYPE_NEXT_VARIANT (main) = type;
+      TYPE_NEXT_VARIANT (type) = TYPE_NEXT_VARIANT (main_tree);
+      TYPE_NEXT_VARIANT (main_tree) = type;
       TYPE_READONLY (type) = save_readonly;
     }
   else