On Mon, Apr 11, 2005 at 12:26:20PM +0200, H.Merijn Brand wrote: > On Mon, 11 Apr 2005 11:15:44 +0100, Tim Bunce <[EMAIL PROTECTED]> wrote: > > > On Sun, Apr 10, 2005 at 05:03:58PM -0500, Andy Lester wrote: > > > Attached is a patch that does for DBI what I've been doing in the Perl > > > core the past few weeks: > > > > > > * Apply const qualifiers where possible > > > * Localize auto variables to internal blocks where possible > > > * Clean up complaints from high-stress GCC compiler warnings. > > > > > > I've been building by using this set of changes to Makefile.PL, which > > > makes GCC pretty picky: > > > > > > Index: Makefile.PL > > > =================================================================== > > > --- Makefile.PL (.../DBI-1.48) (revision 17) > > > +++ Makefile.PL (.../trunk) (revision 17) > > > @@ -127,6 +127,7 @@ > > > VERSION_FROM=> 'DBI.pm', > > > PREREQ_PM => { "Test::Simple" => 0.40 }, > > > EXE_FILES => [ "dbiproxy$ext_pl", "dbiprof$ext_pl" ], > > > + CCFLAGS =>'-DDEBUGGING -DPERL_GCC_PEDANTIC -ansi -pedantic -W > > > -Wno-sign-compare -Wall -Wno-cast-qual -Wpointer-arith > > > -Wmissing-prototypes -Wmissing-noreturn -Wdisabled-optimization > > > -Wbad-function-cast', > > > DIR => [ ], > > > dynamic_lib => { OTHERLDFLAGS => "$::opt_g" }, > > > clean => { FILES=> "\$(DISTVNAME) Perl.xsi t/zv*_*.t" > > > > > > Is this patch something you find useful? If so, I can keep digging. > > > > Sure, so long as it'll still build fine with other compilers. > > (So that CCFLAGS line can't be left as-is :) > > FYI, I had to re-read the message again too. The `patch' above on Makefile.PL > was not part of the suggested patch, but merely to show what he used to get to > the patch itself.
Yeap. I realized but wasn't clear in my reply. > > > This is just from blowing through this for a couple of hours this > > > afternoon. > > > > Great. Did adding consts actually find any bugs? > > In perl-current it did. Not big one's, but it did. Thanks. Tim.