Solaris 2.6, GCC 2.95.2
y.cpp:
struct proc {
unsigned c: 16;
};
void f(struct proc *p)
{
p->c++;
}
% g++ -c -Wall y.cpp
y.cpp: in function `void f(proc *)':
y.cpp:7: warning: value computed is not used
The warning does not occur if, for example, c is defined as an unsigned
short.
-- Ian