This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/4978: invalid expression evaluation in gcc
- From: jakub at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, ggs at homer dot att dot com, nobody at gcc dot gnu dot org
- Date: 21 Feb 2002 16:37:25 -0000
- Subject: Re: c/4978: invalid expression evaluation in gcc
- Reply-to: jakub at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, ggs at homer dot att dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: invalid expression evaluation in gcc
State-Changed-From-To: open->analyzed
State-Changed-By: jakub
State-Changed-When: Thu Feb 21 08:37:24 2002
State-Changed-Why:
There is no sequence point in C after first operand of
< operator, so your testcase has undefined behaviour.
See ISO C99 Annex C, for example.
There are sequence points after first operand of comma
and at the end of if controlling expression, but there is
nothing which requires < operands to be evaluated in any
specific order.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4978