I think there are inconsistencies warnings.
#include
int main( void ) {
for ( int i=0, j=99 ; (++j) = 99 , i<9 ; ++i ) {
std::cout << i << ' ' << j << std::endl;
}
return 0;
}
/usr/bin/g++ -Wall the source code above yields NO warning, while the
increased value 100 of j is UNUSED, si
Sorry, I was wrong.
I assumed, that the warning is concerning the subexpression (++i),
but if we remove the <99 comparison, then the warning disappears,
and hence the warning is concerning the unsused value of the coparison,
namely the value of the non-last member of the comma expression
is n
Package: g++-4.4
Version: 4.4.2-9
Severity: normal
A short example is the following, where none of the values of the two ++i
subexpresions is used inside their enclosing expression, ... and in that sense
we should get the error message twice ..., but the both values are used later,
namely the fir
3 matches
Mail list logo