This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: middle-end/9063: invalid compile-time evaluation of tertiary expression
- From: aj at gcc dot gnu dot org
- To: aj at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, geist at foobox dot com, nobody at gcc dot gnu dot org
- Date: 27 Dec 2002 11:04:47 -0000
- Subject: Re: middle-end/9063: invalid compile-time evaluation of tertiary expression
- Reply-to: aj at gcc dot gnu dot org, aj at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, geist at foobox dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: invalid compile-time evaluation of tertiary expression
Responsible-Changed-From-To: unassigned->aj
Responsible-Changed-By: aj
Responsible-Changed-When: Fri Dec 27 03:04:46 2002
Responsible-Changed-Why:
Taking it.
State-Changed-From-To: open->closed
State-Changed-By: aj
State-Changed-When: Fri Dec 27 03:04:46 2002
State-Changed-Why:
GCC evaluates the expression correct according to the C operator precedence rules, a '+' binds stronger than the '?'.
You should fix your code and add the braces.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9063