This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Re: patch: don't issue -Wreorder warnings when order doesn't matter
2011/7/30 Joern Rennecke <amylaar@spamcop.net>:
> Quoting Jonathan Wakely <jwakely.gcc@gmail.com>:
>
>> I would object to changing the behaviour, or if it changes then it
>> should be controllable so I can continue to get the current behaviour,
>> e.g. -Wreorder=0 does what you propose, -Wreorder=1 does what we have
>> now, and -Wreorder is equivalent to -Wreorder=1
>
> That sounds somewhat obscure (e.g. why isn't -Wreorder=0 the same
> as -Wno-reorder), and at some point people might demand negative values
> for more discriminating checks and floating point values for in-between
> choices.
>
> I think more descriptive would be:
> -Wreorder=nonconst and -Wreorder=any
>
> If someone miraculously cheats Rice's theorem, or wants to propose to get
> as close as possible to tell if reordering has a semantic effect as is
> feasible to tell in a compiler, you could call it -Wreorder=relevant or
> somesuch.
>
>
Thanks.
In my humble opinion the -Wreorder=nonconst and -Wreorder=any sounds ok.
> I want to know the mem-initializers are in the wrong order ASAP so I can correct them immediately, not when I change the initializer to a non-constant.
ok I understand.
Best regards,
Daniel