[Bug tree-optimization/30334] [meta-bug] Request for -Wundefined

egallager at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 14 06:07:18 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30334

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org

--- Comment #18 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #17)
> I agree with the goal of detecting undefined behavior but I don't think a
> catchall warning option like -Wundefined would be very helpful.  Not all
> kinds of undefined behavior are of the same severity so providing a single
> option for all of it would make it hard to clean up code with more than just
> a handful of instances of it.  Especially for late warnings that are
> susceptible to false positives, being able to control them in a targeted way
> is important.
> 
> The trend over the last years has been toward providing granular warning
> options to control the detection of specific/related kinds of problems, like
> -Warray-bounds, or -Wuninitialized.

and even those could be more granular; for -Warray-bounds clang has a separate
-Warray-bounds-pointer-arithmetic (bug 81172), while for -Wuninitialized, gcc
has a separate -Wmaybe-uninitialized (and, with the static analyzer,
-Wanalyzer-use-of-uninitialized-value), while clang has a separate
-Wsometimes-uninitialized and -Wconditional-uninitialized


More information about the Gcc-bugs mailing list