This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11833] New: [3.4 regression] Spurious warning for comma-operator in templates
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Aug 2003 14:43:47 -0000
- Subject: [Bug c++/11833] New: [3.4 regression] Spurious warning for comma-operator in templates
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.