This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the EGCS project.
`-pedantic' and alloca()
- To: egcs-bugs@egcs.cygnus.com
- Subject: `-pedantic' and alloca()
- From: Fergus Henderson <fjh@cs.mu.OZ.AU>
- Date: Thu, 29 Jul 1999 15:49:15 +1000
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.