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 05/10] vla: allow side effects for sizeof argument


>>>>> "Sanimir" == Agovic, Sanimir <sanimir.agovic@intel.com> writes:

Sanimir> It turns out this patch is not needed anymore as the bounds are
Sanimir> resolved before the sizeof function is called. So in v2 this
Sanimir> patch will be dropped from the series.

Tom> (gdb) print sizeof (array[x++])
Tom> For an ordinary array this should not modify x.

Sanimir> Indeed, that is the behavior we have now in HEAD@vla-c99.

I thought sizeof with a vla as an argument had to evaluate its argument.
So it seems that the above may yield incorrect semantics in some other
test case.

Tom


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