[Bug c++/17041] [3.5 regression] Erroneous "suggest parentheses around assignment used as truth value" warning in template members.
jsm at polyomino dot org dot uk
gcc-bugzilla@gcc.gnu.org
Tue Aug 17 15:25:00 GMT 2004
------- Additional Comments From jsm at polyomino dot org dot uk 2004-08-17 15:25 -------
Subject: Re: [3.5 regression] Erroneous "suggest parentheses
around assignment used as truth value" warning in template members.
On Tue, 17 Aug 2004, reichelt at gcc dot gnu dot org wrote:
> http://gcc.gnu.org/ml/gcc-cvs/2004-07/msg00990.html
> seems to be responsible for the regression.
>
> Could you please have a look?
>
> Btw, here's an even shorter testcase:
>
> ====================================================
> template<int> struct A
> {
> int i;
> A() { if ((i = 0)) ; }
> };
>
> A<0> a;
> ====================================================
I take it then that this works (i.e. doesn't warn) in 3.3.x or earlier,
for it to be a regression? Since this warning was *completely* broken
(i.e. never warning even when it should) in 3.4.x as it hadn't been
reimplemented for the new parser.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17041
More information about the Gcc-bugs
mailing list