This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/39089] -Wconversion is buggy with bitwise operators
- From: "gcc at gaul dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Feb 2009 18:40:37 -0000
- Subject: [Bug c++/39089] -Wconversion is buggy with bitwise operators
- References: <bug-39089-17268@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from gcc at gaul dot org 2009-02-03 18:40 -------
Original description is not quite accurate, the or operator does not cause a
spurious warning while the and operator does. Here is a more minimal test
case:
void func(char a, char b, char c)
{
c = a | b;
c = a & b;
c = a | 0x20;
c = a & 0x20; // warn
}
I do not get the spurious warning in SVN from 20090109.
--
gcc at gaul dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gcc at gaul dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39089