This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: 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.


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