c/4697: Warning 'value computed is not used' missing
Herman ten Brugge
Haj.Ten.Brugge@net.HCC.nl
Fri Oct 26 10:12:00 GMT 2001
neil@gcc.gnu.org wrote :
>
> Synopsis: Warning 'value computed is not used' missing
>
> State-Changed-From-To: open->closed
> State-Changed-By: neil
> State-Changed-When: Fri Oct 26 02:33:01 2001
> State-Changed-Why:
> Have faith, the compiler is right. You're computing a + 1, and
> not using the result.
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4697&database=gcc
>
I do not agree. The code looks like:
double tst(double a, double b) { a = a + 1,5 * b ; return a; }
I am using a as the return value. The value returned is a + 1. The
computed value '5 * b' is not used and should give the warning.
gcc-2.95.2 gives the warning 'value computed is not used'.
gcc-3.* does not give any warning.
Where is my mistake?
Herman.
More information about the Gcc-bugs
mailing list