|
|
I committed this patch to the gcc-in-cxx branch to avoid warnings from
the C++ frontend. The most interesting case here is not declaring
'shift' as const in varasm.c, as a workaround to avoid a warning about
shifting too far for the type.
Ian
2009-03-04 Ian Lance Taylor <iant@xxxxxxxxxx>
* rtl.h (SUBREG_PROMOTED_UNSIGNED_P): Add cast.
* ipa-struct-reorg.c (create_general_new_stmt): Initialize rhs.
* ira-build.c (copy_info_to_removed_store_destinations):
Initialize parent_a.
* varasm.c (const_rtx_hash_1): Don't declare 'shift' as const.
* config/i386/i386.c (ix86_expand_builtin): Change fcode to enum
type.
Index: ira-build.c
===================================================================
--- ira-build.c (revision 144568)
+++ ira-build.c (working copy)
@@ -2394,7 +2394,8 @@ static ira_allocno_t *regno_top_level_al
static bool
copy_info_to_removed_store_destinations (int regno)
{
- ira_allocno_t a, parent_a;
+ ira_allocno_t a;
+ ira_allocno_t parent_a = NULL;
ira_loop_tree_node_t parent;
allocno_live_range_t r;
bool merged_p;
Index: varasm.c
===================================================================
--- varasm.c (revision 144568)
+++ varasm.c (working copy)
@@ -3436,7 +3436,7 @@ const_rtx_hash_1 (rtx *xp, void *data)
hwi = INTVAL (x);
fold_hwi:
{
- const int shift = sizeof (hashval_t) * CHAR_BIT;
+ int shift = sizeof (hashval_t) * CHAR_BIT;
const int n = sizeof (HOST_WIDE_INT) / sizeof (hashval_t);
int i;
Index: rtl.h
===================================================================
--- rtl.h (revision 144568)
+++ rtl.h (working copy)
@@ -1117,7 +1117,7 @@ do {
\
} while (0)
#define SUBREG_PROMOTED_UNSIGNED_P(RTX) \
((RTL_FLAG_CHECK1("SUBREG_PROMOTED_UNSIGNED_P", (RTX), SUBREG)->volatil) \
- ? -1 : (RTX)->unchanging)
+ ? -1 : (int) (RTX)->unchanging)
/* Access various components of an ASM_OPERANDS rtx. */
Index: ipa-struct-reorg.c
===================================================================
--- ipa-struct-reorg.c (revision 144568)
+++ ipa-struct-reorg.c (working copy)
@@ -1262,7 +1262,8 @@ create_general_new_stmt (struct access_s
if (is_gimple_assign (new_stmt))
{
lhs = gimple_assign_lhs (new_stmt);
-
+ rhs = NULL_TREE;
+
if (TREE_CODE (lhs) == SSA_NAME)
lhs = SSA_NAME_VAR (lhs);
if (gimple_assign_rhs_code (new_stmt) == SSA_NAME)
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 144568)
+++ config/i386/i386.c (working copy)
@@ -24560,7 +24560,7 @@ ix86_expand_builtin (tree exp, rtx targe
tree arg0, arg1, arg2;
rtx op0, op1, op2, pat;
enum machine_mode mode0, mode1, mode2;
- unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
+ enum ix86_builtins fcode = (enum ix86_builtins) DECL_FUNCTION_CODE (fndecl);
/* Determine whether the builtin function is available under the current ISA.
Originally the builtin was not created if it wasn't applicable to the
|
|