--- Comment #7 from pinskia at gcc dot gnu dot org 2009-02-03 22:24 ---
*** This bug has been marked as a duplicate of 38522 ***
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
--
--- Comment #6 from oleg dot smolsky at riverbed dot com 2009-02-03 22:23
---
Created an attachment (id=17239)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17239&action=view)
The fix from gcc4.4
This is the naive fix merged from the trunk. Fixes two out of three warnings in
C++
--- Comment #5 from oleg dot smolsky at riverbed dot com 2009-02-03 21:13
---
I've just built gcc 4.4 and it emits no warnings for the test case above.
Is there any chance the fix could be back-ported into 4.3?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39089
--- Comment #4 from pinskia at gcc dot gnu dot org 2009-02-03 19:46 ---
I think this is a duplicate of bug 38522 which is fixed for 4.4.0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39089
--- Comment #3 from gcc at gaul dot org 2009-02-03 18:57 ---
After talking with Oleg, there are differences between gcc and g++ compiling
the code in comment #2:
$ g++ --version
g++ (GCC) 4.3.0
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for c
--- 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;
--- Comment #1 from oleg dot smolsky at riverbed dot com 2009-02-03 17:58
---
Created an attachment (id=17238)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17238&action=view)
The test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39089