Re: [PATCH] c/c++: new warning: -Wxor-used-as-pow [PR90885]

2022-09-02 Thread David Malcolm via Gcc-patches
On Tue, 2022-08-30 at 16:40 -0400, Marek Polacek wrote: > 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

Re: [PATCH] c/c++: new warning: -Wxor-used-as-pow [PR90885]

2022-08-30 Thread Marek Polacek via Gcc-patches
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

Re: [PATCH] c/c++: new warning: -Wxor-used-as-pow [PR90885]

2022-08-30 Thread Jason Merrill via Gcc-patches
On 8/11/22 21:38, David Malcolm via Gcc-patches wrote: PR c/90885 notes various places in real-world code where people have written C/C++ code that uses ^ (exclusive or) where presumbably they meant exponentiation. For example

[PATCH] c/c++: new warning: -Wxor-used-as-pow [PR90885]

2022-08-11 Thread David Malcolm via Gcc-patches
PR c/90885 notes various places in real-world code where people have written C/C++ code that uses ^ (exclusive or) where presumbably they meant exponentiation. For example https://codesearch.isocpp.org/cgi-bin/cgi_ppsearch?q=2%5E32=Search currently finds 11 places using "2^32", and all of them