* actions.c (id_cmp): Do pointer arithmetic as `long' not `int' to
ensure enough bits for calculation.
* ch-tree.h (check_text_length): Remove unused parameter.
* convert.c (display_int_cst): Cast a HOST_WIDE_INT argument to
function sprintf into the appropriate type for printing.
* decl.c (print_lang_decl): Use HOST_WIDE_INT_PRINT_DEC as the
format specifier.
(print_mode): Likewise.
(init_decl_processing): Cast the arguments of bcopy/bzero to char *.
* grant.c (grant_array_type): Use HOST_WIDE_INT_PRINT_DEC as
the format specifier.
* inout.c (check_text_length): Remove unused parameter `type'.
(build_chill_associate): Initialize variables `arg1', `arg2',
`arg3', `arg4' and `arg5'.
(build_chill_modify): Likewise.
(scanformcont): Change type of variable `curr' to `unsigned char'.
* lex.c (maybe_downcase): Cast the argument of `tolower' to
`unsigned char'.
* satisfy.c (satisfy): Remove unused parameter in call to
`check_text_length'.
* tasking.c (generate_tasking_code_variable): Pass a HOST_WIDE_INT
as a `long' in call to function `error'.
(decl_tasking_code_variable): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22679
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
+ ensure enough bits for calculation.
+
+ * ch-tree.h (check_text_length): Remove unused parameter.
+
+ * convert.c (display_int_cst): Cast a HOST_WIDE_INT argument to
+ function sprintf into the appropriate type for printing.
+
+ * decl.c (print_lang_decl): Use HOST_WIDE_INT_PRINT_DEC as the
+ format specifier.
+ (print_mode): Likewise.
+ (init_decl_processing): Cast the arguments of bcopy/bzero to char *.
+
+ * grant.c (grant_array_type): Use HOST_WIDE_INT_PRINT_DEC as
+ the format specifier.
+
+ * inout.c (check_text_length): Remove unused parameter `type'.
+ (build_chill_associate): Initialize variables `arg1', `arg2',
+ `arg3', `arg4' and `arg5'.
+ (build_chill_modify): Likewise.
+ (scanformcont): Change type of variable `curr' to `unsigned char'.
+
+ * lex.c (maybe_downcase): Cast the argument of `tolower' to
+ `unsigned char'.
+
+ * satisfy.c (satisfy): Remove unused parameter in call to
+ `check_text_length'.
+
+ * tasking.c (generate_tasking_code_variable): Pass a HOST_WIDE_INT
+ as a `long' in call to function `error'.
+ (decl_tasking_code_variable): Likewise.
+
Wed Sep 30 19:03:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* grant.c (decode_decl_selective): Cast switch's enum argument to
id_cmp (p1, p2)
tree *p1, *p2;
{
- return (int)TREE_VALUE (*p1) - (int)TREE_VALUE (*p2);
+ long diff = (long)TREE_VALUE (*p1) - (long)TREE_VALUE (*p2);
+
+ return (diff < 0) ? -1 : (diff > 0);
}
/* Build the FUNCTION_TYPE or METHOD_TYPE which may raise exceptions
extern tree build_chill_writetext PROTO((tree, tree));
extern void build_enum_tables PROTO((void));
extern tree build_text_mode PROTO((tree, tree, int));
-extern tree check_text_length PROTO((tree, tree));
+extern tree check_text_length PROTO((tree));
extern void init_access_location PROTO((tree, tree));
extern void init_text_location PROTO((tree, tree));
extern void inout_init PROTO((void));
else if (x == '\n')
strcpy (buffer, "'^J'");
else if (x < ' ' || x > '~')
- sprintf (buffer, "'^(%u)'", x);
+ sprintf (buffer, "'^(%u)'", (unsigned int) x);
else
- sprintf (buffer, "'%c'", x);
+ sprintf (buffer, "'%c'", (char) x);
return buffer;
case ENUMERAL_TYPE:
for (fields = TYPE_VALUES (TREE_TYPE (val)); fields != NULL_TREE;
int indent;
{
indent_to (file, indent + 3);
- fprintf (file, "nesting_level %d ", DECL_NESTING_LEVEL (node));
+ fputs ("nesting_level ", file);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, DECL_NESTING_LEVEL (node));
+ fputs (" ", file);
if (DECL_WEAK_NAME (node))
fprintf (file, "weak_name ");
if (CH_DECL_SIGNAL (node))
{
tree itype = TYPE_DOMAIN (mode);
if (CH_STRING_TYPE_P (mode))
- printf (" STRING (%d) OF ",
- TREE_INT_CST_LOW (TYPE_MAX_VALUE (itype)));
+ {
+ fputs (" STRING (", stdout);
+ printf (HOST_WIDE_INT_PRINT_DEC,
+ TREE_INT_CST_LOW (TYPE_MAX_VALUE (itype)));
+ fputs (") OF ", stdout);
+ }
else
- printf (" ARRAY (%d:%d) OF ",
- TREE_INT_CST_LOW (TYPE_MIN_VALUE (itype)),
- TREE_INT_CST_LOW (TYPE_MAX_VALUE (itype)));
+ {
+ fputs (" ARRAY (", stdout);
+ printf (HOST_WIDE_INT_PRINT_DEC,
+ TREE_INT_CST_LOW (TYPE_MIN_VALUE (itype)));
+ fputs (":", stdout);
+ printf (HOST_WIDE_INT_PRINT_DEC,
+ TREE_INT_CST_LOW (TYPE_MAX_VALUE (itype)));
+ fputs (") OF ", stdout);
+ }
mode = TREE_TYPE (mode);
break;
}
tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE,
(((int) LAST_CHILL_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
* sizeof (char)));
- bcopy (chill_tree_code_length,
- tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE,
+ bcopy ((char *) chill_tree_code_length,
+ (char *) (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE),
(((int) LAST_CHILL_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
* sizeof (int)));
- bcopy (chill_tree_code_name,
- tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE,
+ bcopy ((char *) chill_tree_code_name,
+ (char *) (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE),
(((int) LAST_CHILL_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
* sizeof (char *)));
boolean_code_name = (char **) xmalloc (sizeof (char *) * (int) LAST_CHILL_TREE_CODE);
- bzero (boolean_code_name, sizeof (char *) * (int) LAST_CHILL_TREE_CODE);
+ bzero ((char *) boolean_code_name, sizeof (char *) * (int) LAST_CHILL_TREE_CODE);
boolean_code_name[EQ_EXPR] = "=";
boolean_code_name[NE_EXPR] = "/=";
if (TREE_CODE (maxval) == INTEGER_CST)
{
char wrk[20];
- sprintf (wrk, "%d", TREE_INT_CST_LOW (maxval) + 1);
+ sprintf (wrk, HOST_WIDE_INT_PRINT_DEC,
+ TREE_INT_CST_LOW (maxval) + 1);
APPEND (result, wrk);
}
else if (TREE_CODE (maxval) == MINUS_EXPR
}
tree
-check_text_length (type, length)
- tree type, length;
+check_text_length (length)
+ tree length;
{
if (length == NULL_TREE || TREE_CODE (length) == ERROR_MARK)
return length;
tree fname;
tree attr;
{
- tree arg1, arg2, arg3, arg4, arg5, arg6, arg7;
+ tree arg1 = NULL_TREE, arg2 = NULL_TREE, arg3 = NULL_TREE, arg4 = NULL_TREE,
+ arg5 = NULL_TREE, arg6, arg7;
int had_errors = 0;
tree result;
tree assoc;
tree list;
{
- tree arg1, arg2, arg3, arg4, arg5, arg6, arg7;
+ tree arg1 = NULL_TREE, arg2 = NULL_TREE, arg3 = NULL_TREE, arg4 = NULL_TREE,
+ arg5 = NULL_TREE, arg6, arg7;
int had_errors = 0, numargs;
tree fname = NULL_TREE, attr = NULL_TREE;
tree result;
int *nextargnum;
{
fcsstate_t state = FormatText;
- char curr;
+ unsigned char curr;
int dig;
while (len--)
while (*str)
{
if (ISUPPER ((unsigned char) *str))
- *str = tolower (*str);
+ *str = tolower ((unsigned char)*str);
str++;
}
}
else if (CH_IS_TEXT_MODE (exp) &&
DECL_NAME (decl) == get_identifier ("__textlength"))
DECL_INITIAL (decl)
- = check_text_length (exp, DECL_INITIAL (decl));
+ = check_text_length (DECL_INITIAL (decl));
}
}
else if (TREE_CODE (decl) == FIELD_DECL)
/* check for value should be assigned is out of range */
if (TREE_INT_CST_LOW (*tasking_code_ptr) >
TREE_INT_CST_LOW (TYPE_MAX_VALUE (chill_taskingcode_type_node)))
- error ("Tasking code %d out of range for `%s'.",
- TREE_INT_CST_LOW (*tasking_code_ptr),
+ error ("Tasking code %ld out of range for `%s'.",
+ (long) TREE_INT_CST_LOW (*tasking_code_ptr),
IDENTIFIER_POINTER (name));
}
/* check for value should be assigned is out of range */
if (TREE_INT_CST_LOW (*tasking_code_ptr) >
TREE_INT_CST_LOW (TYPE_MAX_VALUE (chill_taskingcode_type_node)))
- error ("Tasking code %d out of range for `%s'.",
- TREE_INT_CST_LOW (*tasking_code_ptr),
+ error ("Tasking code %ld out of range for `%s'.",
+ (long) TREE_INT_CST_LOW (*tasking_code_ptr),
IDENTIFIER_POINTER (name));
}