egcs-CVS19980928, some more CHILL warning patches
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Tue Sep 29 12:10:00 GMT 1998
Here's a few more in the gcc/ch directory. Okay to install?
--Kaveh
Tue Sep 29 11:30:11 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.
* parse.c (expand_expr): Provide prototype.
* tasking.c (build_receive_buffer_case_end): Mark parameter
`label_cnt' with ATTRIBUTE_UNUSED.
(build_receive_signal_case_end): Likewise.
(build_delay_case_end): Likewise.
(check_queue_size): Likewise for parameter `type'.
* 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'.
diff -rup orig/egcs-CVS19980928/gcc/ch/actions.c egcs-CVS19980928/gcc/ch/actions.c
--- orig/egcs-CVS19980928/gcc/ch/actions.c Mon Sep 28 20:23:01 1998
+++ egcs-CVS19980928/gcc/ch/actions.c Tue Sep 29 11:22:20 1998
@@ -1227,7 +1227,7 @@ chill_handle_multi_case_label (selector,
tree expr;
if (label == NULL_TREE || TREE_CODE (label) == ERROR_MARK)
- return;
+ return NULL_TREE;
if (TREE_CODE (label) == INTEGER_CST)
{
diff -rup orig/egcs-CVS19980928/gcc/ch/except.c egcs-CVS19980928/gcc/ch/except.c
--- orig/egcs-CVS19980928/gcc/ch/except.c Mon Sep 28 20:23:04 1998
+++ egcs-CVS19980928/gcc/ch/except.c Tue Sep 29 10:22:14 1998
@@ -19,11 +19,7 @@ along with GNU CC; see the file COPYING.
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. */
@@ -51,6 +47,11 @@ the Free Software Foundation, 675 Mass A
#define SETJMP_LIBRARY_NAME "setjmp"
#endif
#endif
+
+#include "tree.h"
+#include "ch-tree.h"
+#include "rtl.h"
+#include "toplev.h"
extern int expand_exit_needed;
diff -rup orig/egcs-CVS19980928/gcc/ch/parse.c egcs-CVS19980928/gcc/ch/parse.c
--- orig/egcs-CVS19980928/gcc/ch/parse.c Mon Sep 28 20:23:08 1998
+++ egcs-CVS19980928/gcc/ch/parse.c Tue Sep 29 11:19:10 1998
@@ -73,6 +73,12 @@ extern struct rtx_def* gen_label_rtx
extern void emit_jump PROTO((struct rtx_def *));
extern void emit_label PROTO((struct rtx_def *));
+/* We'd like to include expr.h directly to get this prototype, but
+ because of conflicts between rtl.h & parse.h, we can't. So we fake
+ the last argument as an int instead of an "enum expand_modifier". */
+extern struct rtx_def* expand_expr PROTO((tree, struct rtx_def *,
+ enum machine_mode, int));
+
static int parse_action PROTO((void));
extern int lineno;
diff -rup orig/egcs-CVS19980928/gcc/ch/tasking.c egcs-CVS19980928/gcc/ch/tasking.c
--- orig/egcs-CVS19980928/gcc/ch/tasking.c Mon Sep 28 20:23:09 1998
+++ egcs-CVS19980928/gcc/ch/tasking.c Tue Sep 29 10:57:33 1998
@@ -2086,7 +2086,7 @@ build_receive_case_label (signame, locli
*/
static void
build_receive_buffer_case_end (label_cnt, buf_list, else_clause)
- tree label_cnt, buf_list, else_clause;
+ tree label_cnt ATTRIBUTE_UNUSED, buf_list, else_clause;
{
struct rc_state_type *rc_state = current_rc_state;
tree alist;
@@ -2186,7 +2186,7 @@ build_receive_buffer_case_end (label_cnt
*/
static void
build_receive_signal_case_end (label_cnt, sig_list, else_clause)
- tree label_cnt, sig_list, else_clause;
+ tree label_cnt ATTRIBUTE_UNUSED, sig_list, else_clause;
{
struct rc_state_type *rc_state = current_rc_state;
tree alist, temp1;
@@ -2595,7 +2595,7 @@ build_delay_case_label (eventlist, if_or
*/
void
build_delay_case_end (label_cnt, event_list)
- tree label_cnt, event_list;
+ tree label_cnt ATTRIBUTE_UNUSED, event_list;
{
struct dl_state_type *dl_state = current_dl_state;
rtx dldone = gen_label_rtx ();
@@ -3210,7 +3210,7 @@ invalidate_buffer_element_mode (bufmode)
tree
check_queue_size (type, qsize)
- tree type, qsize;
+ tree type ATTRIBUTE_UNUSED, qsize;
{
if (qsize == NULL_TREE || TREE_CODE (qsize) == ERROR_MARK)
return qsize;
diff -rup orig/egcs-CVS19980928/gcc/ch/typeck.c egcs-CVS19980928/gcc/ch/typeck.c
--- orig/egcs-CVS19980928/gcc/ch/typeck.c Mon Sep 28 20:23:09 1998
+++ egcs-CVS19980928/gcc/ch/typeck.c Tue Sep 29 10:46:47 1998
@@ -2586,7 +2586,7 @@ layout_chill_range_type (rangetype, must
/* 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 */
@@ -2725,7 +2725,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;
@@ -3232,7 +3232,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;
}
@@ -3335,7 +3335,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);
@@ -3428,8 +3428,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
More information about the Gcc-patches
mailing list