[PATCH v4 12/13] test: basic c99 vla tests for C primitives
Agovic, Sanimir
sanimir.agovic@intel.com
Fri Jan 17 13:36:00 GMT 2014
> >>>>> "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.
>
Can you please guide me and point out some cases? I will add them to
the test. Thanks.
-Sanimir
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
More information about the Gdb-patches
mailing list