Message ID | 4EA47B66.8030707@oracle.com |
---|---|
State | New |
Headers | show |
> Anyway, the below appears to work for me. Eric shall I commit it?
I have other errors for config/i386/i386.c on my x86-64 machine. But are we
sure that we want to warn on
static unsigned HOST_WIDE_INT unknown[4] = { -1, -1, 0, 0 };
with -Wall? This seems overly picky to me.
On 10/23/2011 10:39 PM, Paolo Carlini wrote: > On 10/23/2011 10:25 PM, Eric Botcazou wrote: >>> Oh my, I thought I was till using C here... Ok, I'll fix that. >> The base compiler is a C compiler, stage 2/3 are built with the C++ >> compiler. > Yes, yes. Sorry about this. > > Anyway, the below appears to work for me. Eric shall I commit it? Nope, doesn't work, there are *many* more issues in gcc/config. I'm afraid we are not ready yet to enable this, target maintainer have to help cleaning up gcc/config first, I'm going to revert my patch. Paolo.
On 10/23/2011 10:47 PM, Paolo Carlini wrote: > On 10/23/2011 10:39 PM, Paolo Carlini wrote: >> On 10/23/2011 10:25 PM, Eric Botcazou wrote: >>>> Oh my, I thought I was till using C here... Ok, I'll fix that. >>> The base compiler is a C compiler, stage 2/3 are built with the C++ >>> compiler. >> Yes, yes. Sorry about this. >> >> Anyway, the below appears to work for me. Eric shall I commit it? > Nope, doesn't work, there are *many* more issues in gcc/config. > > I'm afraid we are not ready yet to enable this, target maintainer have > to help cleaning up gcc/config first, I'm going to revert my patch. Done. Paolo.
On Sun, Oct 23, 2011 at 3:45 PM, Eric Botcazou <ebotcazou@adacore.com> wrote: >> Anyway, the below appears to work for me. Eric shall I commit it? > > I have other errors for config/i386/i386.c on my x86-64 machine. But are we > sure that we want to warn on > > static unsigned HOST_WIDE_INT unknown[4] = { -1, -1, 0, 0 }; > > with -Wall? This seems overly picky to me. > The warning probably should not be in -Wall. It is fairly recent in C++, and I think we should allow users to adapt before enabling it by default.
On 10/23/2011 11:05 PM, Gabriel Dos Reis wrote: > On Sun, Oct 23, 2011 at 3:45 PM, Eric Botcazou<ebotcazou@adacore.com> wrote: >>> Anyway, the below appears to work for me. Eric shall I commit it? >> I have other errors for config/i386/i386.c on my x86-64 machine. But are we >> sure that we want to warn on >> >> static unsigned HOST_WIDE_INT unknown[4] = { -1, -1, 0, 0 }; >> >> with -Wall? This seems overly picky to me. >> > The warning probably should not be in -Wall. It is fairly recent in C++, and I > think we should allow users to adapt before enabling it by default. The issue is that we wanted -Wconversion to be enabled by -Wc++0x-compat (after all, it's what the PR asks) but the latter is *already* in -Wall. Personally, I would be in favor of taking -Wc++0x-compat out of -Wall. Paolo.
On Sun, Oct 23, 2011 at 4:28 PM, Paolo Carlini <paolo.carlini@oracle.com> wrote: > On 10/23/2011 11:05 PM, Gabriel Dos Reis wrote: >> >> On Sun, Oct 23, 2011 at 3:45 PM, Eric Botcazou<ebotcazou@adacore.com> >> wrote: >>>> >>>> Anyway, the below appears to work for me. Eric shall I commit it? >>> >>> I have other errors for config/i386/i386.c on my x86-64 machine. But are >>> we >>> sure that we want to warn on >>> >>> static unsigned HOST_WIDE_INT unknown[4] = { -1, -1, 0, 0 }; >>> >>> with -Wall? This seems overly picky to me. >>> >> The warning probably should not be in -Wall. It is fairly recent in C++, >> and I >> think we should allow users to adapt before enabling it by default. > > The issue is that we wanted -Wconversion to be enabled by -Wc++0x-compat > (after all, it's what the PR asks) but the latter is *already* in -Wall. yes. > > Personally, I would be in favor of taking -Wc++0x-compat out of -Wall. > Patch pre-approved. It makes sense though that -Wextra implies -Wc++0x-compat.
Hi, >> Personally, I would be in favor of taking -Wc++0x-compat out of -Wall. >> > Patch pre-approved. Thanks. > It makes sense though that -Wextra implies -Wc++0x-compat. Indeed, it would. However, unfortunately, we are using -W to bootstrap (it just failed on me). Thus I'm bootstrapping and testing the below, which just takes -Wc++0x-compat out from -Wall without adding it to -Wextra. I'll wait anyway until tomorrow in case of further comments. Thanks again, Paolo. //////////////////////////////
Index: tree-ssa-ccp.c =================================================================== --- tree-ssa-ccp.c (revision 180346) +++ tree-ssa-ccp.c (working copy) @@ -2011,7 +2011,9 @@ ccp_visit_stmt (gimple stmt, edge *taken_edge_p, t Mark them VARYING. */ FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_ALL_DEFS) { - prop_value_t v = { VARYING, NULL_TREE, { -1, (HOST_WIDE_INT) -1 } }; + prop_value_t v = + { VARYING, NULL_TREE, { (unsigned HOST_WIDE_INT) -1, + (HOST_WIDE_INT) -1 } }; set_lattice_value (def, v); } Index: tree-object-size.c =================================================================== --- tree-object-size.c (revision 180346) +++ tree-object-size.c (working copy) @@ -41,7 +41,9 @@ struct object_size_info unsigned int *stack, *tos; }; -static unsigned HOST_WIDE_INT unknown[4] = { -1, -1, 0, 0 }; +static unsigned HOST_WIDE_INT unknown[4] += { (unsigned HOST_WIDE_INT)-1, (unsigned HOST_WIDE_INT)-1, + (unsigned HOST_WIDE_INT)0, (unsigned HOST_WIDE_INT)0 }; static tree compute_object_offset (const_tree, const_tree); static unsigned HOST_WIDE_INT addr_object_size (struct object_size_info *,