This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)
On 07/21/16 00:00, Jakub Jelinek wrote:
> On Wed, Jul 20, 2016 at 09:50:03PM +0000, Bernd Edlinger wrote:
>> But the built-in alloca is still recognized because the builtin
>> does have ECF_MAY_BE_ALLOCA and ECF_MALLOC.
> But __builtin_alloca_with_align likely doesn't have ECF_MALLOC set (even
> when it should).
DEF_BUILTIN_STUB (BUILT_IN_ALLOCA_WITH_ALIGN, "__builtin_alloca_with_align")
do you know what the attributes are instead,
or where that is constructed?
At least in this example it seems to work:
void *alloca(unsigned long);
void bar(unsigned long n)
char *x = (char*) __builtin_alloca_with_align(n,64);
*x = 0;
g++ -O3 -S -Wall test.cc -ansi
and make check-c has no regressions.