This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] testsuite/gdb.base: Make skip test not rely on undefined behaviour.
- From: Will Newton <will dot newton at linaro dot org>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Patch Tracking <patches at linaro dot org>
- Date: Wed, 12 Jun 2013 10:50:54 +0100
- Subject: Re: [PATCH] testsuite/gdb.base: Make skip test not rely on undefined behaviour.
- References: <51B22951 dot 1000601 at linaro dot org> <CA+=Sn1kYLbmMeqhNZ_SsUpJvAB9ftHWpYO-BHwBWYOL0V1ua7Q at mail dot gmail dot com>
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