Here's a very annoying regression that swamps my builds in warning messages: ------------------------------ void g (int, int); template <int> void f () { for (int i;; ++i, ++i) g(i,i); } template void f<1> (); ------------------------------ g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -W -Wall -c x.cc x.cc: In function `void f()': x.cc:4: warning: left-hand operand of comma expression has no effect Clearly, the left hand side of the comma expression _does_ have an effect. The warning disappears when the function is not a template. W.
This is a dup of bug 11512. *** This bug has been marked as a duplicate of 11512 ***
Subject: Re: [3.4 regression] Spurious warning for comma-operator in templates > *** This bug has been marked as a duplicate of 11512 *** Darn, I knew I had seen this somewhere before. Thanks Andrew! W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ices.utexas.edu www: http://www.ices.utexas.edu/~bangerth/