This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 05/10] vla: allow side effects for sizeof argument
- From: Pedro Alves <palves at redhat dot com>
- To: "Agovic, Sanimir" <sanimir dot agovic at intel dot com>
- Cc: "'Tom Tromey'" <tromey at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 19 Nov 2013 17:05:35 +0000
- Subject: Re: [PATCH 05/10] vla: allow side effects for sizeof argument
- Authentication-results: sourceware.org; auth=none
- References: <1382366424-21010-1-git-send-email-sanimir dot agovic at intel dot com> <1382366424-21010-6-git-send-email-sanimir dot agovic at intel dot com> <87d2mua1gi dot fsf at fleche dot redhat dot com> <0377C58828D86C4588AEEC42FC3B85A71769F292 at IRSMSX105 dot ger dot corp dot intel dot com> <87ppqp9kme dot fsf at fleche dot redhat dot com> <0377C58828D86C4588AEEC42FC3B85A7176B5F16 at IRSMSX105 dot ger dot corp dot intel dot com>
On 11/18/2013 08:39 AM, Agovic, Sanimir wrote:
>
> It turns out this patch is not needed anymore as the bounds are resolved
> before the sizeof function is called. So in v2 this patch will be dropped
> from the series.
>
>> > (gdb) print sizeof (array[x++])
>> >
>> > For an ordinary array this should not modify x.
> Indeed, that is the behavior we have now in HEAD@vla-c99.
Sounds like something that the testsuite should have caught.
I guess we don't have such a test?
--
Pedro Alves