This looks good to me, one thing though:

On Thu, Aug 11, 2022 at 09:38:12PM -0400, David Malcolm via Gcc-patches wrote:
> --- a/gcc/c-family/c.opt
> +++ b/gcc/c-family/c.opt
> @@ -1439,6 +1439,10 @@ Wwrite-strings
>  C ObjC C++ ObjC++ Var(warn_write_strings) Warning
>  In C++, nonzero means warn about deprecated conversion from string literals 
> to 'char *'.  In C, similar warning, except that the conversion is of course 
> not deprecated by the ISO C standard.
>  
> +Wxor-used-as-pow
> +C C++ Common Var(warn_xor_used_as_pow) Warning Init(1)

This doesn't include ObjC/ObjC++, but...

> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -414,6 +414,7 @@ Objective-C and Objective-C++ Dialects}.
>  -Wvector-operation-performance @gol
>  -Wvla  -Wvla-larger-than=@var{byte-size}  -Wno-vla-larger-than @gol
>  -Wvolatile-register-var  -Wwrite-strings @gol
> +-Wxor-used-as-pow @gol
>  -Wzero-length-bounds}
>  
>  @item Static Analyzer Options
> @@ -9661,6 +9662,20 @@ modifier does not inhibit all optimizations that may 
> eliminate reads
>  and/or writes to register variables.  This warning is enabled by
>  @option{-Wall}.
>  
> +@item -Wxor-used-as-pow @r{(C, C++, Objective-C and Objective-C++ only)}

...here it includes Objective-C and Objective-C++.

Marek

Reply via email to