[Bug c/27153] function result is dereferenced error

2006-04-18 Thread joseph at codesourcery dot com
--- Comment #13 from joseph at codesourcery dot com 2006-04-18 12:57 --- Subject: Re: function result is dereferenced error On Tue, 18 Apr 2006, falk at debian dot org wrote: > > However, the evaluation of the > > arguments to printf may overlap and the order is unspecified, so ther

Re: [Bug c/27153] function result is dereferenced error

2006-04-18 Thread Joseph S. Myers
On Tue, 18 Apr 2006, falk at debian dot org wrote: > > However, the evaluation of the > > arguments to printf may overlap and the order is unspecified, so there are > > many possible outputs from the program (but "3 2 1" and "3 1 1", for > > example, are not possible). > > I don't understand w

[Bug c/27153] function result is dereferenced error

2006-04-18 Thread falk at debian dot org
--- Comment #12 from falk at debian dot org 2006-04-18 12:37 --- (In reply to comment #11) > No, this testcase is unspecified, not undefined. There are intervening > sequence points at the start and end of each call to function OK. > However, the evaluation of the > arguments to pri

[Bug c/27153] function result is dereferenced error

2006-04-18 Thread joseph at codesourcery dot com
--- Comment #11 from joseph at codesourcery dot com 2006-04-18 11:17 --- Subject: Re: function result is dereferenced error On Tue, 18 Apr 2006, falk at debian dot org wrote: > Uhm, this has nothing to do at all with evaluation order. Evaluation > order of arguments is unspecified (n

[Bug c/27153] function result is dereferenced error

2006-04-17 Thread falk at debian dot org
--- Comment #10 from falk at debian dot org 2006-04-18 06:27 --- Uhm, this has nothing to do at all with evaluation order. Evaluation order of arguments is unspecified (not undefined, which wouldn't make a lot of sense), but that is in fact irrelevant here, it could lead to, say, 3 1 2,

[Bug c/27153] function result is dereferenced error

2006-04-17 Thread bangerth at dealii dot org
--- Comment #9 from bangerth at dealii dot org 2006-04-18 03:21 --- > It does not matter either. The evaluation of a function argument is an atomic > procedure. No, it actually isn't. > If it starts it should generate a result. Isn't it strange if the > compiler evaluates a little bi

[Bug c/27153] function result is dereferenced error

2006-04-17 Thread pinskia at gcc dot gnu dot org
--- Comment #8 from pinskia at gcc dot gnu dot org 2006-04-18 00:21 --- (In reply to comment #7) > (In reply to comment #6) > > In C, there is no ordering left to right, please go read the C FAQ at: > > http://www.eskimo.com/~scs/c-faq.com/expr/index.html > > subpage: > > http://www.eski

[Bug c/27153] function result is dereferenced error

2006-04-17 Thread alexey at cs dot sunysb dot edu
--- Comment #7 from alexey at cs dot sunysb dot edu 2006-04-18 00:06 --- (In reply to comment #6) > In C, there is no ordering left to right, please go read the C FAQ at: > http://www.eskimo.com/~scs/c-faq.com/expr/index.html > subpage: > http://www.eskimo.com/~scs/c-faq.com/expr/comma.

[Bug c/27153] function result is dereferenced error

2006-04-14 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2006-04-14 16:54 --- In C, there is no ordering left to right, please go read the C FAQ at: http://www.eskimo.com/~scs/c-faq.com/expr/index.html subpage: http://www.eskimo.com/~scs/c-faq.com/expr/comma.html This page answers your questi

[Bug c/27153] function result is dereferenced error

2006-04-13 Thread alexey at cs dot sunysb dot edu
--- Comment #5 from alexey at cs dot sunysb dot edu 2006-04-14 03:06 --- > > > It is undefined on which function call is done in what order > > It does not matter in this example. > Why do you think that? Because the result is "x x x" for all orders instead of 1 2 3. > int *a, *b, *c;

[Bug c/27153] function result is dereferenced error

2006-04-13 Thread pinskia at gcc dot gnu dot org
--- 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 bi

[Bug c/27153] function result is dereferenced error

2006-04-13 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-04-14 02:50 --- (In reply to comment #2) > > It is undefined on which function call is done in what order > > It does not matter in this example. > Why do you think that? It does generate a call to func but not as you expected i

[Bug c/27153] function result is dereferenced error

2006-04-13 Thread alexey at cs dot sunysb dot edu
--- Comment #2 from alexey at cs dot sunysb dot edu 2006-04-14 02:46 --- > It is undefined on which function call is done in what order It does not matter in this example. > and also were the > dereferencing is done, before or after the next function call. It does not matter either.

[Bug c/27153] function result is dereferenced error

2006-04-13 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-04-14 02:31 --- It is undefined on which function call is done in what order and also were the dereferencing is done, before or after the next function call. *** This bug has been marked as a duplicate of 11751 *** -- pinskia a