[Bug c/27153] function result is dereferenced error

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Apr 14 02:55:00 GMT 2006



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-04-14 02:55 -------
(In reply to comment #2)
> It does not matter either. The evaluation of a function argument is an atomic
> procedure. If it starts it should generate a result. Isn't it strange if the
> compiler evaluates a little bit of the first argument, then a little bit of the
> second argument, then a little bit of the third argument, then goes back to the
> first and completes the evaluation?

Why do you think it is an atomic procedure?  There is nothing in the standard
that says:

f(a, a++, b+(a++)+(a++))

evaluates each of those as atomic in fact the reverse is true in that it says
the order is undefined as there is no sequence point inbetween those arguments
as the comma in this case is not the comma operator but argument seperator.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27153



More information about the Gcc-bugs mailing list