[Bug c++/11833] New: [3.4 regression] Spurious warning for comma-operator in templates
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Wed Aug 6 14:43:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11833
Summary: [3.4 regression] Spurious warning for comma-operator in
templates
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: critical
Priority: P1
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
CC: gcc-bugs at gcc dot gnu dot org
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.
More information about the Gcc-bugs
mailing list