Hi,
sorry for reviving this old thread (it wasn't long though). The topic
came up again in IRC today.
On 03.04.18 18:47, ron minnich wrote:
> So I would actually be in favor of what paul is advocating, but not the
> inconistency. To keep it consistent, I don't see that just using 1U
> everywhere is that huge a deal. C is not that pretty any more, so this
> little bit of ugliness doesn't strike me as a big deal. Bugs from stuff
> like 3<<31 scare me more.
What I just noticed, and what Julius already told us (and we'd have
probably paid more attention if we weren't topic posting). The warning
in question `-Wshift-overflow=2` explicitly only checks the sign bit
problem, e.g. 1 << 31. The bug variant 3 << 31 is already covered by
the sane `-Wshift-overflow`.
So there is absolutely nothing to gain from the =2 version by defi-
nition.
Should we enable more warnings? yes! Should we enable warnings that
are discouraged by their authors? probably not.
Nico
PS. This is actually not as bad as what I have seen people doing to
scripts because of shellcheck. But that thought reminds me that
such tools, and excessive compiler warnings, can harm software
quality.
_______________________________________________
coreboot mailing list -- [email protected]
To unsubscribe send an email to [email protected]