g++ 4.3.3 emits warnings for every statement in the following function when the code is built this way:
..../gcc43/bin/g++ -c -Wall -Wconversion test.cpp void func(unsigned char a, unsigned char b, unsigned char *out) { *out = a | b; *out = out[0] & 0x20; out[0] &= 0x20; } I'd expect bitwise operators to see/preserve argument widths... -- Summary: -Wconversion is buggy with bitwise operators Product: gcc Version: 4.3.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: oleg dot smolsky at riverbed dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39089