This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: â??x--â?? would self-add before opration "-- " ï¼?
- From: "Andi Hellmund" <mail at andihellmund dot com>
- To: "pem" <pemryan at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 7 Jun 2010 13:13:19 +0200
- Subject: Re: â??x--â?? would self-add before opration "-- " ï¼?
- References: <201006071538.06003.pemryan@gmail.com>
- Reply-to: mail at andihellmund dot com
> I am not familar with both c++ and compiler implementation, donot konw
> why the results are differnt for gcc and clang. Anyone could help and
> explain this difference for me?
The ISO C standard says that the evaluation order of function arguments is
unspecified [ISO C99, 6.5.2.2-11], though the implementation (GCC vs.
clang) is free to choose which evaluation order to use. That's why you see
these differences between GCC and clang.
Andi