/* Functions to support general ended bitmaps.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
#endif
/* Global data */
-bitmap_element bitmap_zero; /* An element of all zero bits. */
+bitmap_element bitmap_zero_bits; /* An element of all zero bits. */
bitmap_element *bitmap_free; /* Freelist of bitmap elements. */
static void bitmap_element_free PARAMS ((bitmap, bitmap_element *));
{
indx = indx1;
from1_tmp = from1_ptr;
- from2_tmp = &bitmap_zero;
+ from2_tmp = &bitmap_zero_bits;
from1_ptr = from1_ptr->next;
indx1 = (from1_ptr) ? from1_ptr->indx : HIGHEST_INDEX;
}
else
{
indx = indx2;
- from1_tmp = &bitmap_zero;
+ from1_tmp = &bitmap_zero_bits;
from2_tmp = from2_ptr;
from2_ptr = from2_ptr->next;
indx2 = (from2_ptr) ? from2_ptr->indx : HIGHEST_INDEX;
/* Functions to support general ended bitmaps.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
/* Global data */
extern bitmap_element *bitmap_free; /* Freelist of bitmap elements */
-extern bitmap_element bitmap_zero; /* Zero bitmap element */
+extern bitmap_element bitmap_zero_bits; /* Zero bitmap element */
/* Clear a bitmap by freeing up the linked list. */
extern void bitmap_clear PARAMS ((bitmap));
ptr2_ = ptr2_->next; \
\
tmp2_ = ((ptr2_ != 0 && ptr2_->indx == ptr1_->indx) \
- ? ptr2_ : &bitmap_zero); \
+ ? ptr2_ : &bitmap_zero_bits); \
\
for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \
{ \
cfun->x_dont_save_pending_sizes_p = 1;
}
\f
-/* SPECPARMS is an identifier list--a chain of TREE_LIST nodes
- each with a parm name as the TREE_VALUE. A null pointer as TREE_VALUE
- stands for an ellipsis in the identifier list.
-
- PARMLIST is the data returned by get_parm_info for the
- parmlist that follows the semicolon.
-
- We return a value of the same sort that get_parm_info returns,
- except that it describes the combination of identifiers and parmlist. */
-
-tree
-combine_parm_decls (specparms, parmlist, void_at_end)
- tree specparms, parmlist;
- int void_at_end;
-{
- register tree fndecl = current_function_decl;
- register tree parm;
-
- tree parmdecls = TREE_PURPOSE (parmlist);
-
- /* This is a chain of any other decls that came in among the parm
- declarations. They were separated already by get_parm_info,
- so we just need to keep them separate. */
- tree nonparms = TREE_VALUE (parmlist);
-
- tree types = 0;
-
- for (parm = parmdecls; parm; parm = TREE_CHAIN (parm))
- DECL_WEAK (parm) = 0;
-
- for (parm = specparms; parm; parm = TREE_CHAIN (parm))
- {
- register tree tail, found = NULL;
-
- /* See if any of the parmdecls specifies this parm by name. */
- for (tail = parmdecls; tail; tail = TREE_CHAIN (tail))
- if (DECL_NAME (tail) == TREE_VALUE (parm))
- {
- found = tail;
- break;
- }
-
- /* If declaration already marked, we have a duplicate name.
- Complain, and don't use this decl twice. */
- if (found && DECL_WEAK (found))
- {
- error_with_decl (found, "multiple parameters named `%s'");
- found = 0;
- }
-
- /* If the declaration says "void", complain and ignore it. */
- if (found && VOID_TYPE_P (TREE_TYPE (found)))
- {
- error_with_decl (found, "parameter `%s' declared void");
- TREE_TYPE (found) = integer_type_node;
- DECL_ARG_TYPE (found) = integer_type_node;
- layout_decl (found, 0);
- }
-
- /* Traditionally, a parm declared float is actually a double. */
- if (found && flag_traditional
- && TYPE_MAIN_VARIANT (TREE_TYPE (found)) == float_type_node)
- {
- TREE_TYPE (found) = double_type_node;
- DECL_ARG_TYPE (found) = double_type_node;
- layout_decl (found, 0);
- }
-
- /* If no declaration found, default to int. */
- if (!found)
- {
- found = build_decl (PARM_DECL, TREE_VALUE (parm),
- integer_type_node);
- DECL_ARG_TYPE (found) = TREE_TYPE (found);
- DECL_SOURCE_LINE (found) = DECL_SOURCE_LINE (fndecl);
- DECL_SOURCE_FILE (found) = DECL_SOURCE_FILE (fndecl);
- error_with_decl (found, "type of parameter `%s' is not declared");
- pushdecl (found);
- }
-
- TREE_PURPOSE (parm) = found;
-
- /* Mark this decl as "already found". */
- DECL_WEAK (found) = 1;
- }
-
- /* Complain about any actual PARM_DECLs not matched with any names. */
-
- for (parm = parmdecls; parm;)
- {
- tree next = TREE_CHAIN (parm);
- TREE_CHAIN (parm) = 0;
-
- /* Complain about args with incomplete types. */
- if (!COMPLETE_TYPE_P (TREE_TYPE (parm)))
- {
- error_with_decl (parm, "parameter `%s' has incomplete type");
- TREE_TYPE (parm) = error_mark_node;
- }
-
- if (! DECL_WEAK (parm))
- {
- error_with_decl (parm,
- "declaration for parameter `%s' but no such parameter");
- /* Pretend the parameter was not missing.
- This gets us to a standard state and minimizes
- further error messages. */
- specparms
- = chainon (specparms,
- tree_cons (parm, NULL_TREE, NULL_TREE));
- }
-
- parm = next;
- }
-
- /* Chain the declarations together in the order of the list of names.
- At the same time, build up a list of their types, in reverse order. */
-
- parm = specparms;
- parmdecls = 0;
- {
- register tree last;
- for (last = 0; parm; parm = TREE_CHAIN (parm))
- if (TREE_PURPOSE (parm))
- {
- if (last == 0)
- parmdecls = TREE_PURPOSE (parm);
- else
- TREE_CHAIN (last) = TREE_PURPOSE (parm);
- last = TREE_PURPOSE (parm);
- TREE_CHAIN (last) = 0;
-
- types = tree_cons (NULL_TREE, TREE_TYPE (parm), types);
- }
- }
-
- if (void_at_end)
- return tree_cons (parmdecls, nonparms,
- nreverse (tree_cons (NULL_TREE, void_type_node, types)));
-
- return tree_cons (parmdecls, nonparms, nreverse (types));
-}
-\f
/* Finish up a function declaration and compile that function
all the way to assembler language output. The free the storage
for the function definition.
/* Definitions for C parsing and type checking.
Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
extern void check_for_loop_decls PARAMS ((void));
extern tree check_identifier PARAMS ((tree, tree));
extern void clear_parm_order PARAMS ((void));
-extern tree combine_parm_decls PARAMS ((tree, tree, int));
extern int complete_array_type PARAMS ((tree, tree, int));
extern void declare_parm_level PARAMS ((int));
extern tree define_label PARAMS ((const char *, int,
/* Definitions for CHILL parsing and type checking.
Copyright (C) 1992, 1993, 1994, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
extern int c_decode_option PARAMS ((int, char **));
extern void c_mark_varargs PARAMS ((void));
extern void clear_parm_order PARAMS ((void));
-extern tree combine_parm_decls PARAMS ((tree, tree, int));
extern int complete_array_type PARAMS ((tree, tree, int));
extern void declare_parm_level PARAMS ((int));
extern tree define_label PARAMS ((const char *, int, tree));
of sign bit copies, we can just subtract that amount from the
number. */
if (GET_CODE (XEXP (x, 1)) == CONST_INT
- && INTVAL (XEXP (x, 1)) >= 0 && INTVAL (XEXP (x, 1)) < bitwidth)
+ && INTVAL (XEXP (x, 1)) >= 0
+ && INTVAL (XEXP (x, 1)) < (int) bitwidth)
{
num0 = num_sign_bit_copies (XEXP (x, 0), mode);
return MAX (1, num0 - (code == ROTATE ? INTVAL (XEXP (x, 1))
num0 = num_sign_bit_copies (XEXP (x, 0), mode);
if (GET_CODE (XEXP (x, 1)) == CONST_INT
&& INTVAL (XEXP (x, 1)) > 0)
- num0 = MIN (bitwidth, num0 + INTVAL (XEXP (x, 1)));
+ num0 = MIN ((int) bitwidth, num0 + INTVAL (XEXP (x, 1)));
return num0;
/* Left shifts destroy copies. */
if (GET_CODE (XEXP (x, 1)) != CONST_INT
|| INTVAL (XEXP (x, 1)) < 0
- || INTVAL (XEXP (x, 1)) >= bitwidth)
+ || INTVAL (XEXP (x, 1)) >= (int) bitwidth)
return 1;
num0 = num_sign_bit_copies (XEXP (x, 0), mode);
tree addr, size, placement;
int flags;
{
- tree fn, fns, fnname, fntype, argtypes, args, type;
+ tree fn = NULL_TREE;
+ tree fns, fnname, fntype, argtypes, args, type;
int pass;
if (addr == error_mark_node)
/* Copy-initialization where the cv-unqualified version of the source
type is the same class as, or a derived class of, the class of the
destination [is treated as direct-initialization]. [dcl.init] */
- if (fn)
- savew = warningcount, savee = errorcount;
+ savew = warningcount, savee = errorcount;
expr = build_new_method_call (NULL_TREE, complete_ctor_identifier,
build_tree_list (NULL_TREE, expr),
TYPE_BINFO (totype),
if (!pedantic)
{
int rank1 = IDENTITY_RANK, rank2 = IDENTITY_RANK;
- struct z_candidate *w, *l;
+ struct z_candidate *w = 0, *l = 0;
for (i = 0; i < len; ++i)
{
static tree copy_virtuals PARAMS ((tree));
static void build_ctor_vtbl_group PARAMS ((tree, tree));
static void build_vtt PARAMS ((tree));
+static tree binfo_ctor_vtable PARAMS ((tree));
static tree *build_vtt_inits PARAMS ((tree, tree, tree *, tree *));
static tree dfs_build_secondary_vptr_vtt_inits PARAMS ((tree, void *));
static tree dfs_ctor_vtable_bases_queue_p PARAMS ((tree, void *data));
tree binfo;
{
tree primary_base;
- tree result;
+ tree result = NULL_TREE;
tree virtuals;
primary_base = CLASSTYPE_PRIMARY_BINFO (BINFO_TYPE (binfo));
build_java_class_ref (type)
tree type;
{
- tree name, class_decl;
+ tree name = NULL_TREE, class_decl;
static tree CL_suffix = NULL_TREE;
if (CL_suffix == NULL_TREE)
CL_suffix = get_identifier("class$");
output_call_frame_info (for_eh)
int for_eh;
{
- register unsigned long i;
+ register unsigned int i;
register dw_fde_ref fde;
register dw_cfi_ref cfi;
char l1[20], l2[20];
register dw_die_ref die;
{
register unsigned long abbrev_id;
- register unsigned long n_alloc;
+ register unsigned int n_alloc;
register dw_die_ref c;
register dw_attr_ref d_attr, a_attr;
dwarf2out_finish ()
{
limbo_die_node *node, *next_node;
- dw_die_ref die;
+ dw_die_ref die = 0;
/* Traverse the limbo die list, and add parent/child links. The only
dies without parents that should be here are concrete instances of
rtx exception_handler_labels;
static int call_site_base;
-static int sjlj_funcdef_number;
+static unsigned int sjlj_funcdef_number;
static htab_t type_to_runtime_map;
/* Describe the SjLj_Function_Context structure. */
static void
dw2_build_landing_pads ()
{
- int i, j;
+ int i;
+ unsigned int j;
for (i = cfun->eh->last_region_number; i > 0; --i)
{
rtx last_action_insn = NULL_RTX;
rtx last_landing_pad = NULL_RTX;
rtx first_no_action_insn = NULL_RTX;
- int call_site;
+ int call_site = 0;
if (USING_SJLJ_EXCEPTIONS || cfun->eh->region_tree == NULL)
return;
#endif
int have_tt_data;
int funcdef_number;
- int tt_format_size;
+ int tt_format_size = 0;
/* Not all functions need anything. */
if (! cfun->uses_eh_lsda)
struct move_by_pieces *data;
{
unsigned int size = GET_MODE_SIZE (mode);
- rtx to1, from1;
+ rtx to1 = NULL_RTX, from1;
while (data->len >= size)
{
tree elttype = TREE_TYPE (type);
int const_bounds_p = (host_integerp (TYPE_MIN_VALUE (domain), 0)
&& host_integerp (TYPE_MAX_VALUE (domain), 0));
- HOST_WIDE_INT minelt;
- HOST_WIDE_INT maxelt;
+ HOST_WIDE_INT minelt = 0;
+ HOST_WIDE_INT maxelt = 0;
/* If we have constant bounds for the range of the type, get them. */
if (const_bounds_p)
mark_regs_live_at_end (set)
regset set;
{
- int i;
+ unsigned int i;
/* If exiting needs the right stack value, consider the stack pointer
live at the end of the function. */
for (decl = DECL_ARGUMENTS (fndecl); decl; decl = TREE_CHAIN (decl))
{
HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl));
+ HOST_WIDE_INT size_rtl;
instantiate_decl (DECL_RTL (decl), size, valid_only);
/* If the parameter was promoted, then the incoming RTL mode may be
larger than the declared type size. We must use the larger of
the two sizes. */
- size = MAX (GET_MODE_SIZE (GET_MODE (DECL_INCOMING_RTL (decl))), size);
+ size_rtl = GET_MODE_SIZE (GET_MODE (DECL_INCOMING_RTL (decl)));
+ size = MAX (size_rtl, size);
instantiate_decl (DECL_INCOMING_RTL (decl), size, valid_only);
}
swap with, omit the swap. */
if (GET_CODE (i1dest) == REG && REGNO (i1dest) == FIRST_STACK_REG
- && GET_CODE (i1src) == REG && REGNO (i1src) == hard_regno - 1
+ && GET_CODE (i1src) == REG
+ && REGNO (i1src) == (unsigned) hard_regno - 1
&& find_regno_note (i1, REG_DEAD, FIRST_STACK_REG) == NULL_RTX)
return;
/* If the previous insn wrote to the reg we are to swap with,
omit the swap. */
- if (GET_CODE (i1dest) == REG && REGNO (i1dest) == hard_regno
+ if (GET_CODE (i1dest) == REG && REGNO (i1dest) == (unsigned) hard_regno
&& GET_CODE (i1src) == REG && REGNO (i1src) == FIRST_STACK_REG
&& find_regno_note (i1, REG_DEAD, FIRST_STACK_REG) == NULL_RTX)
return;
if (regno < 0)
abort ();
- if (regno != REGNO (recog_data.operand[i]))
+ if ((unsigned int) regno != REGNO (recog_data.operand[i]))
{
/* recog_data.operand[i] is not in the right place. Find
it and swap it with whatever is already in I's place.
for (j = 0; j < n_outputs; j++)
if (STACK_REG_P (recog_data.operand[j])
- && REGNO (recog_data.operand[j]) == i)
+ && REGNO (recog_data.operand[j]) == (unsigned) i)
{
regstack->reg[++regstack->top] = i;
SET_HARD_REG_BIT (regstack->reg_set, i);
static int try_auto_increment PARAMS ((rtx, rtx, rtx, rtx, HOST_WIDE_INT, int));
static int find_matches PARAMS ((rtx, struct match *));
-static void replace_in_call_usage PARAMS ((rtx *, int, rtx, rtx));
+static void replace_in_call_usage PARAMS ((rtx *, unsigned int, rtx, rtx));
static int fixup_match_1 PARAMS ((rtx, rtx, rtx, rtx, rtx, int, int, int, FILE *))
;
static int reg_is_remote_constant_p PARAMS ((rtx, rtx, rtx));
static void
replace_in_call_usage (loc, dst_reg, src, insn)
rtx *loc;
- int dst_reg;
+ unsigned int dst_reg;
rtx src;
rtx insn;
{
order as the reloads. Thus if the outer reload is also of type
RELOAD_OTHER, we are guaranteed that this inner reload will be
output before the outer reload. */
- push_reload (SUBREG_REG (in), NULL_RTX, &SUBREG_REG (in), NULL_RTX,
+ push_reload (SUBREG_REG (in), NULL_RTX, &SUBREG_REG (in), (rtx *)0,
in_class, VOIDmode, VOIDmode, 0, 0, opnum, type);
dont_remove_subreg = 1;
}
enum machine_mode mode;
int sets;
{
- int nregs = HARD_REGNO_NREGS (regno, mode);
- int endregno = regno + nregs;
+ unsigned int nregs = HARD_REGNO_NREGS (regno, mode);
+ unsigned int endregno = regno + nregs;
if ((GET_CODE (PATTERN (insn)) == CLOBBER
|| (sets && GET_CODE (PATTERN (insn)) == SET))
&& GET_CODE (XEXP (PATTERN (insn), 0)) == REG)
{
- int test = REGNO (XEXP (PATTERN (insn), 0));
+ unsigned int test = REGNO (XEXP (PATTERN (insn), 0));
return test >= regno && test < endregno;
}
|| (sets && GET_CODE (PATTERN (insn)) == SET))
&& GET_CODE (XEXP (elt, 0)) == REG)
{
- int test = REGNO (XEXP (elt, 0));
+ unsigned int test = REGNO (XEXP (elt, 0));
if (test >= regno && test < endregno)
return 1;
code = GET_CODE (x);
if (code == REG)
{
- int regno = REGNO (x);
+ unsigned int regno = REGNO (x);
if (regno < FIRST_PSEUDO_REGISTER)
return;
reload_combine ()
{
rtx insn, set;
- int first_index_reg = -1, last_index_reg;
+ int first_index_reg = -1;
+ int last_index_reg = 0;
int i;
unsigned int r;
int last_label_ruid;
rtx usage_rtx = XEXP (XEXP (link, 0), 0);
if (GET_CODE (usage_rtx) == REG)
{
- int i;
+ unsigned int i;
unsigned int start_reg = REGNO (usage_rtx);
unsigned int num_regs =
HARD_REGNO_NREGS (start_reg, GET_MODE (usage_rtx));
/* Instruction scheduling pass. This file computes dependencies between
instructions.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by,
and currently maintained by, Jim Wilson (wilson@cygnus.com)
{
rtx link, next;
int present_p;
- enum reg_note present_dep_type;
rtx cond1, cond2;
/* Don't depend an insn on itself. */
dramatically for some code. */
if (true_dependency_cache != NULL)
{
+ enum reg_note present_dep_type = 0;
+
if (anti_dependency_cache == NULL || output_dependency_cache == NULL)
abort ();
if (TEST_BIT (true_dependency_cache[INSN_LUID (insn)], INSN_LUID (elem)))
- present_dep_type = 0;
+ /* Do nothing (present_set_type is already 0). */
+ ;
else if (TEST_BIT (anti_dependency_cache[INSN_LUID (insn)],
INSN_LUID (elem)))
present_dep_type = REG_DEP_ANTI;
if (CONSTANT_P (op))
{
int offset, part;
- unsigned HOST_WIDE_INT val;
+ unsigned HOST_WIDE_INT val = 0;
/* ??? This code is partly redundant with code bellow, but can handle
the subregs of floats and similar corner cases.
/* We can't handle this case yet. */
if (GET_MODE_BITSIZE (outermode) >= HOST_BITS_PER_WIDE_INT)
- return NULL;
+ return NULL_RTX;
part = offset >= HOST_BITS_PER_WIDE_INT;
if ((BITS_PER_WORD > HOST_BITS_PER_WIDE_INT
/* We don't handle synthetizing of non-integral constants yet. */
if (GET_MODE_CLASS (outermode) != MODE_INT)
- return NULL;
+ return NULL_RTX;
if (BYTES_BIG_ENDIAN || WORDS_BIG_ENDIAN)
{
return NULL_RTX;
/* Bail out in case resulting subreg would be incorrect. */
if (final_offset % GET_MODE_SIZE (outermode)
- || final_offset >= GET_MODE_SIZE (innermostmode))
- return NULL;
+ || (unsigned) final_offset >= GET_MODE_SIZE (innermostmode))
+ return NULL_RTX;
}
else
{
if (offset == final_offset)
final_offset = 0;
else
- return NULL;
+ return NULL_RTX;
}
/* Recurse for futher possible simplifications. */