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


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

`-pedantic' and alloca()


If `-pedantic' is specified, but `-ansi' is not, then I believe
gcc should warn about any use of gcc extensions, but accept them anyway.

In particular if `-pedantic' is specified, it should warn about
any use of alloca() which refers to the gcc builtin.

For example, I think it should issue a warning for the following code:

	#include <stddef.h>
	void *alloca (size_t);
	void foo(void) { alloca(1); }

Currently (egcs-1.1.2) it doesn't.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3        |     -- the last words of T. S. Garp.

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