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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2015-07-25 00:00:00         |2021-4-8
             Blocks|                            |87403

--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
No progress in GCC 11.

Clang issues -Wpointer-bool-conversion for these cases:

$ cat pr64463.c && clang -S -Wall pr64463.c
__attribute__ ((returns_nonnull)) char* f (void);

void g (void)
{
  if (!f ())
    __builtin_abort ();
}
pr64463.c:5:8: warning: nonnull function call 'f()' will evaluate to 'true' on
      first encounter [-Wpointer-bool-conversion]
  if (!f ())
      ~^~~~
pr64463.c:1:17: note: declared 'returns_nonnull' here
__attribute__ ((returns_nonnull)) char* f (void);
                ^
1 warning generated.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403
[Bug 87403] [Meta-bug] Issues that suggest a new warning

Reply via email to