aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-09-30 16:49:55 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-09-30 16:49:55 +0000
commit36ef59e79797f3317ed83ef1b4760aab004d59cb (patch)
tree6a472d7252babe2acf61a1cf7852504969d64b2e
parent5efaf7b00ee3751680bffd751fa86eed6007c46a (diff)
downloadgcc-36ef59e79797f3317ed83ef1b4760aab004d59cb.zip
gcc-36ef59e79797f3317ed83ef1b4760aab004d59cb.tar.gz
gcc-36ef59e79797f3317ed83ef1b4760aab004d59cb.tar.bz2
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
-rw-r--r--gcc/ch/ChangeLog15
-rw-r--r--gcc/ch/actions.c2
-rw-r--r--gcc/ch/except.c9
-rw-r--r--gcc/ch/typeck.c12
4 files changed, 27 insertions, 11 deletions
diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog
index 5eb5e19..ebada872 100644
--- a/gcc/ch/ChangeLog
+++ b/gcc/ch/ChangeLog
@@ -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
diff --git a/gcc/ch/actions.c b/gcc/ch/actions.c
index cd1c46b..6d636b7 100644
--- a/gcc/ch/actions.c
+++ b/gcc/ch/actions.c
@@ -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)
{
diff --git a/gcc/ch/except.c b/gcc/ch/except.c
index 9312e02..0a911bd 100644
--- a/gcc/ch/except.c
+++ b/gcc/ch/except.c
@@ -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;
diff --git a/gcc/ch/typeck.c b/gcc/ch/typeck.c
index 45bf8df..a4795df 100644
--- a/gcc/ch/typeck.c
+++ b/gcc/ch/typeck.c
@@ -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