This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] testsuite/gdb.base: Make skip test not rely on undefined behaviour.


On 12 June 2013 00:00, Andrew Pinski <pinskia@gmail.com> wrote:
> On Fri, Jun 7, 2013 at 11:41 AM, Will Newton <will.newton@linaro.org> wrote:
>>
>> The skip test currently relies on the order of evaluation of
>> arguments which is not defined. Use an arithmetic expression
>> where order is defined instead.
>
>
> No the order is not defined there either.  The left side or the right
> side of the addition can be evaluated first as there is no sequence
> point.  Maybe it is better to do:
> baz((foo(), bar()));
>
> The order with that is defined as the comma operator is a sequence point.

Thanks, I was getting associativity mixed up with evaluation order.
I'll respin the patch with that change.

--
Will Newton
Toolchain Working Group, Linaro


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]