[Top][All Lists]

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

Re: alloca redeclaration warning on MinGW

From: Paul Eggert
Subject: Re: alloca redeclaration warning on MinGW
Date: Sat, 02 Jul 2005 07:57:17 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Hrvoje Niksic <address@hidden> writes:

> Paul Eggert <address@hidden> writes:
>> This doesn't look right to me, because if _MSC_VER is defined, it
>> includes <malloc.h> without the "# define alloca _alloca" line that
>> other people seem to have needed.
> I haven't needed that line in Wget.  Maybe it was needed in older
> versions of Visual C?

More likely it's the other way around.
indicates that Visual Studio 2005 doesn't define alloca.  And
suggests that a #define for alloca was removed from mingw last year.

>> Also, what is the difference between _MSC_VER, __BORLANDC__, and
>> __MINGW32__?  Are these different compilers?
> They are different compilers.  What they have in common is that they
> (these days) run in the Win32 environment,

Is there a single symbol that all three define?  I'd rather not have
to maintain a list of Microsoft Windows 32 compilers.  (And please
don't call it "Win32", as it's not a win.  A better name is "32-bit
Windows operating environment", or "Woe32".)

For example, <http://megapov.inetart.net/manual-1.2/binaries.html>
talks about __BORLANDC__, __DJGPP__, __MINGW32__, __CYGWIN__, __DMC__,
and __WATCOMC__.  I doubt whether even this list is exhaustive.  Nor
do I know which of these compilers require <malloc.h>.

This sounds like a job for an Autoconf test rather than for trying to
guess from predefined macros.  But someone with some Woe32 expertise
will be needed to write the test.

reply via email to

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