[ I'm catching up on a variety of things...  So apologies if y'all
  have settled these issues. ]

On 11/02/2016 01:32 PM, Jakub Jelinek wrote:
But obviously not all levels of the warning can/should be enabled
with -Wall/-Werror.  There are cases which are worth warning by default
(the case where we want to inform the user if you reach this stmt,
you'll get your program killed (will call __chk_fail)) is something
that ought like before be enabled by default; can have a warning
switch users can disable.
Then there is the case where there is a sure buffer overflow (not using
-D_FORTIFY_SOURCE, but still __bos (, 0) tells the buffer is too short,
and it is unconditional (no tricks with PHIs where one path has short
and another part has long size).  This is something that is useful
in -Wall.
The rest I'm very doubtful about even for -Wextra.
I would hesitate on distinguishing between something that flows via a PHI vs something that is explicit in the IL.

It is entirely possible that an unrelated path isolation might take a PHI where one path is short and one long and split it into two paths. At that point they're both going to be explicit in the IL. You'd then have to use something like global anticipability analysis to determine if they're executed unconditionally.

Jeff

Reply via email to