This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch to enable using C alloca for CC=gcc


  In message <199709060620.XAA00880@ninemoons.com>you write:
  > I don't believe this change will cause any ill effects for other
  > configurations that define USE_C_ALLOCA in the manner suggested in
  > gcc.texi:
  > 
  > 	#ifndef __GNUC__
  > 	#define USE_C_ALLOCA
  > 	#else
  > 	#define alloca __builtin_alloca
  > 	#endif
Well, some ports just define it regardless of the value of __GNUC__;
the idea being that just because you're compiling with GCC doesn't
mean you want the __builtin_alloca.  For example you might be compiling
with gcc -fno-builtin -- which some ports have done by default in the
past.

And, IMHO, compiling alloca and including it on the link line isn't
going to hurt anything.  In fact, I do this locally because I often
end up with mixed cc and gcc compiled code -- the "cc" code doesn't
expand alloca as a builtin.

Always compiling alloca and including it on the link line would also
simplify the makefiles.

That's the direction I'd like to see things go; I don't know if Jim
has other opinions.

If we get to that stage, then you should be able to get by with just
using -fno-builtin.


jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]