This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4 12/13] test: basic c99 vla tests for C primitives
- From: Tom Tromey <tromey at redhat dot com>
- To: "Agovic\, Sanimir" <sanimir dot agovic at intel dot com>
- Cc: "palves\ at redhat dot com" <palves at redhat dot com>, "xdje42\ at gmail dot com" <xdje42 at gmail dot com>, "gdb-patches\ at sourceware dot org" <gdb-patches at sourceware dot org>, "Boell\, Keven" <keven dot boell at intel dot com>
- Date: Thu, 16 Jan 2014 10:33:24 -0700
- Subject: Re: [PATCH v4 12/13] test: basic c99 vla tests for C primitives
- Authentication-results: sourceware.org; auth=none
- References: <1387282678-3847-1-git-send-email-sanimir dot agovic at intel dot com> <1387282678-3847-13-git-send-email-sanimir dot agovic at intel dot com> <871u09orgl dot fsf at fleche dot redhat dot com> <0377C58828D86C4588AEEC42FC3B85A7176D3671 at IRSMSX105 dot ger dot corp dot intel dot com>
>>>>> "Sanimir" == Agovic, Sanimir <sanimir.agovic@intel.com> writes:
Tom> I didn't see any tests for the case where there should be a side effect.
Sanimir> This line from above:
Sanimir> gdb_test "print sizeof (++int_vla\[0\])" [...]
Sanimir> Is used to ensure that no side effect happen to arguments
Sanimir> passed to sizeof.
Sanimir> The test is trying to express the following:
Sanimir> int i = 42; sizeof(++i); assert (i == 42)
Sanimir> Is it OK?
Yeah, that's good -- but I think there are also cases where a side
effect is expected, and it would be good to have a test for that as
well.
Tom