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 v4 12/13] test: basic c99 vla tests for C primitives


>>>>> "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


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