[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alloca redeclaration warning on MinGW

From: Hrvoje Niksic
Subject: Re: alloca redeclaration warning on MinGW
Date: Mon, 27 Jun 2005 13:12:17 +0200
User-agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (Jumbo Shrimp, linux)

Hrvoje Niksic <address@hidden> writes:

> One way to deal with this is to add "# undef alloca" before the
> definition,

It now occurred to me that this won't work because malloc.h is
normally included *after* config.h.  Instead, maybe the declaration
should be amended like this:

# include <alloca.h>
#elif defined _MSC_VER || defined __MINGW32__ || defined __BORLANDC__
# include <malloc.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX

(It seems that declaring alloca in malloc.h is a Win32 standard which
all Windows compilers respect.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]