Commit 36ef59e7 by Kaveh R. Ghazi Committed by Kaveh Ghazi

Warning fixes:

	* 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
parent 5efaf7b0
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> 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 * actions.c (id_cmp): Do pointer arithmetic as `long' not `int' to
......
...@@ -1229,7 +1229,7 @@ chill_handle_multi_case_label (selector, label) ...@@ -1229,7 +1229,7 @@ chill_handle_multi_case_label (selector, label)
tree expr; tree expr;
if (label == NULL_TREE || TREE_CODE (label) == ERROR_MARK) if (label == NULL_TREE || TREE_CODE (label) == ERROR_MARK)
return; return NULL_TREE;
if (TREE_CODE (label) == INTEGER_CST) if (TREE_CODE (label) == INTEGER_CST)
{ {
......
...@@ -19,11 +19,7 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -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. */ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "config.h" #include "config.h"
#include "tree.h"
#include "ch-tree.h"
#include "rtl.h"
#include "system.h" #include "system.h"
#include "toplev.h"
/* On Suns this can get you to the right definition if you /* On Suns this can get you to the right definition if you
set the right value for TARGET. */ set the right value for TARGET. */
...@@ -52,6 +48,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -52,6 +48,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#endif #endif
#endif #endif
#include "tree.h"
#include "ch-tree.h"
#include "rtl.h"
#include "toplev.h"
extern int expand_exit_needed; extern int expand_exit_needed;
static tree link_handler_decl; static tree link_handler_decl;
......
...@@ -2597,7 +2597,7 @@ layout_chill_range_type (rangetype, must_be_const) ...@@ -2597,7 +2597,7 @@ layout_chill_range_type (rangetype, must_be_const)
/* Compute number of bits to represent magnitude of a /* Compute number of bits to represent magnitude of a
negative value. Add one to MINVALUE since range of negative value. Add one to MINVALUE since range of
negative numbers includes the power of two. */ negative numbers includes the power of two. */
unsigned negprecision = floor_log2 (-minvalue - 1) + 1; int negprecision = floor_log2 (-minvalue - 1) + 1;
if (negprecision > precision) if (negprecision > precision)
precision = negprecision; precision = negprecision;
precision += 1; /* room for sign bit */ precision += 1; /* room for sign bit */
...@@ -2736,7 +2736,7 @@ apply_chill_array_layout (array_type) ...@@ -2736,7 +2736,7 @@ apply_chill_array_layout (array_type)
tree array_type; tree array_type;
{ {
tree layout, temp, what, element_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 stepsize_specified;
int start_bit_error = 0; int start_bit_error = 0;
int length_error = 0; int length_error = 0;
...@@ -3243,7 +3243,7 @@ layout_chill_struct_type (t) ...@@ -3243,7 +3243,7 @@ layout_chill_struct_type (t)
} }
else 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); DECL_ALIGN (x) = MAX (DECL_ALIGN (x), min_align);
was_pos = 0; was_pos = 0;
} }
...@@ -3346,7 +3346,7 @@ smash_dummy_type (type) ...@@ -3346,7 +3346,7 @@ smash_dummy_type (type)
{ {
/* Save fields that we don't want to copy from ORIGIN. */ /* Save fields that we don't want to copy from ORIGIN. */
tree origin = TREE_TYPE (type); tree origin = TREE_TYPE (type);
tree main = TYPE_MAIN_VARIANT (origin); tree main_tree = TYPE_MAIN_VARIANT (origin);
int save_uid = TYPE_UID (type); int save_uid = TYPE_UID (type);
struct obstack *save_obstack = TYPE_OBSTACK (type); struct obstack *save_obstack = TYPE_OBSTACK (type);
tree save_name = TYPE_NAME (type); tree save_name = TYPE_NAME (type);
...@@ -3439,8 +3439,8 @@ smash_dummy_type (type) ...@@ -3439,8 +3439,8 @@ smash_dummy_type (type)
if (save_readonly) if (save_readonly)
{ /* TYPE is READ ORIGIN. { /* TYPE is READ ORIGIN.
Add this type to the chain of variants of TYPE. */ Add this type to the chain of variants of TYPE. */
TYPE_NEXT_VARIANT (type) = TYPE_NEXT_VARIANT (main); TYPE_NEXT_VARIANT (type) = TYPE_NEXT_VARIANT (main_tree);
TYPE_NEXT_VARIANT (main) = type; TYPE_NEXT_VARIANT (main_tree) = type;
TYPE_READONLY (type) = save_readonly; TYPE_READONLY (type) = save_readonly;
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment