Other cases to test: the != operator (should warn in same cases as ==);
boolean uses of pointers such as if (p), !p, p?x:y, and implicit or
explicit conversion to bool (none of those boolean uses of pointers should
warn since there's no explicit integer null pointer constant involved in
the imp
Hi Martin,
On Sat, Nov 09, 2024 at 06:15:35PM GMT, Martin Uecker wrote:
>
> This patch enables the Wzero-as-null-pointer-constant for C.
> The second version added more tests and fixes one condition
> to not incorrectly warn for nullptr.
>
>
> Bootstrapped and regression tested on x86_64.
>
>
This patch enables the Wzero-as-null-pointer-constant for C.
The second version added more tests and fixes one condition
to not incorrectly warn for nullptr.
Bootstrapped and regression tested on x86_64.
c: add Wzero-as-null-pointer-constant [PR117059]
Add warnings for the use o