Software Quality Binutils
Paul Koning
paulkoning@comcast.net
Tue Aug 14 13:22:00 GMT 2018
> On Aug 14, 2018, at 7:12 AM, John Darrington <john@darrington.wattle.id.au> wrote:
>
> ...
> I think it's flagging things like:
>
> if (cond)
> {
> do_this ();
> do_that ();
> }
> else
> {
> do_this ();
> }
>
> ... which it wants changed to:
>
> do_this ();
> if (cond)
> do_that ();
>
>
> which of-course has the same effect iff evaluating cond does not
> have side effects.
Not so; if do_this() may change cond, then the two are semantically different.
paul
More information about the Binutils
mailing list