[Bug target/35124] Method _alloca is defined different by MSVCRT as by gcc.

dannysmith at users dot sourceforge dot net gcc-bugzilla@gcc.gnu.org
Thu Feb 14 17:46:00 GMT 2008



------- Comment #7 from dannysmith at users dot sourceforge dot net  2008-02-14 17:46 -------
(In reply to comment #6)
> I agree, that the havoc for 32-bit backward compatibility is to avoid.
> But the havoc for windows sources using -fno-builtin and using _alloca () for
> stack allocation produces in future even more troubles IMHO.

Why should windows sources need to use __alloca.

If someone really wants an MSCV compatible (one underscore)  _alloca they just
add this to their srcs
void *_alloca (size_t size) {return __builtin_alloca (size));


MSDN documentation says that "This function is deprecated because a more secure
version is available; see _malloca."


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35124



More information about the Gcc-bugs mailing list