This is the mail archive of the gcc@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]
Other format: [Raw text]

alloca + inline


Hello.

I did some tests with gcc 3.2 and -as expected- alloca is preserved
in inline functions. 
Which means that we can say:

	static inline void *calloca (int i)
	{
		void *ret = alloca (i);
		memset(ret, 0, i);
		return ret;
	}


Can you guarantee that it will always be so?
Can we consider this standard behaviour?


btw, I was searching through the archives and I found a message
which sais that inlining should be refused in functions that use
alloca.  If I use the always_inline attribute, can I still to my work?

I'm not subscribed to this list, so please CC me.


Thanks

stelios


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