Bug 11833 - [3.4 regression] Spurious warning for comma-operator in templates
Summary: [3.4 regression] Spurious warning for comma-operator in templates
Status: RESOLVED DUPLICATE of bug 11512
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P1 critical
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-06 14:43 UTC by Wolfgang Bangerth
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Bangerth 2003-08-06 14:43:47 UTC
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.
Comment 1 Andrew Pinski 2003-08-06 14:46:45 UTC
This is a dup of bug 11512.

*** This bug has been marked as a duplicate of 11512 ***
Comment 2 Wolfgang Bangerth 2003-08-06 14:55:58 UTC
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/