On Wed, Jan 4, 2017 at 2:23 PM, Alexandre Oliva <aol...@redhat.com> wrote:
> On Jan  4, 2017, Richard Biener <richard.guent...@gmail.com> wrote:
>
>> On Tue, Jan 3, 2017 at 7:19 PM, Jeff Law <l...@redhat.com> wrote:
>>> On 01/02/2017 10:29 PM, Alexandre Oliva wrote:
>>>> * simplify.c (simplify_transformation_to_array): Assert the
>>>> array access is in range.  Fix whitespace.
>
>> But once we default to release checking it will warn again?
>
> I guess it will, if one builds with -O3 in that setting.
>
>> That said, I think this kind of workaround is bad :/
>
> I can't say I'm proud of it ;-)
>
> The assert is probably stands on its own: it's reasonable, for
> documentation purposes, to state we're not accessing the arrays past
> their end, because other parts of the code ensure this is the case.
>
> Now, it's a bit fortunate and unfortunate that adding the assert *also*
> silences the warning, because then we add to the patch analysis not just
> whether the assert is desirable on its own, but whether the consequence
> of silencing the warning in this particular way is desirable.
>
> I figured the assert was still desirable, but if that's not the
> consensus, I won't mind dropping the proposed change.  Unfortunately I
> don't have another that silences the warning without (or even with)
> impact on codegen.

#pragma GCC diagnostic push ("Wno-array-bounds")

#pragma GCC diagnostic pop

? (well, fix the syntax for me please ;))

Richard.

>
> --
> Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
> You must be the change you wish to see in the world. -- Gandhi
> Be Free! -- http://FSFLA.org/   FSF Latin America board member
> Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer

Reply via email to