> -----Original Message-----
> From: ext Andy Lester [mailto:[EMAIL PROTECTED]
> Sent: 28 April, 2005 17:29
> To: Hietaniemi Jarkko (Nokia-NVO/Helsinki)
> Cc: perl5-porters@perl.org
> Subject: Re: (in blead) a missing const in a prototype
> 
> 
> On Thu, Apr 28, 2005 at 08:52:06AM +0300, 
> [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:
> > > If PADOFFSET was a pointer, it would be different.
> > 
> > All true.  But now if the declaration has const but the proto doesn't,
> > compilers will whine.  (E.g. Visual C does.)
> 
> Oof, I didn't know.  gcc doesn't mind.

In general, I wouldn't trust gcc to tell that much, even with -Wall.
The -Wall does *not* mean "all the warnings".  Gcc 3.x and 4.x are getting
better at whining, though.  Especially naughty gcc is at silently enabling
gcc-specific extensions, and not warning about their portability problems.

Some extra warning/strictness options, for varying levels of pain
(don't try these all at once with the Perl sources or you will go blind :-)

-Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual
-Wconversion -Wdeclaration-after-statement -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow
-Wsign-compare -Wstrict-prototypes -Wwrite-strings -ansi -pedantic


> 

Reply via email to