[Bug c/31128] __builtin_stack_restore/__builtin_stack_save should not be exposed to the user
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon May 28 19:08:00 GMT 2007
------- Comment #7 from pinskia at gcc dot gnu dot org 2007-05-28 19:08 -------
(In reply to comment #6)
> This is very useful for compilers generating C code (e.g. LLVM, and various
> other source -> C compilers). Why remove it? These compilers are generating
> partially structured code, that don't have syntactic blocks required for VLAs.
Because there are better ways of implementing that in the generated C code.
You can create a fake VLA (that is of size 0).
Like:
int f(int t1)
{
{
int t = 0;
int a[t];
int *b = __builtin_alloca(t1);
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31128
More information about the Gcc-bugs
mailing list