This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Undefined behavior in genautomata.c?
* Sebastian Pop:
> By the way, how is this different than detecting a bound on:
>
> {
> int foo[1335];
>
> for (i = 0; i < some_param; i++)
> foo[i];
> }
>
> vs.
>
> {
> some_struct{ int foo[1335];} s;
>
> for (i = 0; i < some_param; i++)
> s.foo[i];
> }
Nothing. But in the genautomata case, struct description is allocated
on the heap, with appropriate room for storing more elements.