Trouble with alloca.h

Eli Zaretskii <eliz-mXXj517/[email protected]>
Newsgroups gmane.comp.gnu.mingw.user
Message-ID <[email protected]>
The new header alloca.h defines 'alloca' unconditionally as (AFAIU) an
inline function:

  __CRT_ALIAS void *alloca( size_t __n ){ return __builtin_alloca( __n ); }

This caused me trouble while building a GNU package, because Gnulib's
alloca.h makes 'alloca' a macro:

  #ifndef alloca
  # ifdef __GNUC__
  #  define alloca __builtin_alloca

I'm not yet sure why Gnulib decides that it needs to use its own
alloca.h, but I know that many packages do the above regardless, when
the compiler is GCC.

Should MinGW's alloca.h perhaps be more defensive, and only define its
own version if 'alloca' is not already defined as a macro?

_______________________________________________
MinGW-Users mailing list
[email protected]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.osdn.me/mailman/listinfo/mingw-users
Also: mailto:[email protected]?subject=unsubscribe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.