X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Porting%2Fpumpkin.pod;h=d7610595f04d5508fd6aa544e459d9e4be590d7c;hb=22d4bb9ccb8701e68f9243547d7e3a3c55f70908;hp=99776b50d2eeafd26eed2e255bd52bd16b1a1f42;hpb=4b19af017623bfa3bb72bb164598a517f586e0d3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Porting/pumpkin.pod b/Porting/pumpkin.pod index 99776b5..d761059 100644 --- a/Porting/pumpkin.pod +++ b/Porting/pumpkin.pod @@ -701,6 +701,34 @@ supports dynamic loading, you can also test static loading with You can also hand-tweak your config.h to try out different #ifdef branches. +=head2 Other tests + +=over 4 + +=item CHECK_FORMAT + +To test the correct use of printf-style arguments, C with +S<-Dccflags='-DCHECK_FORMAT -Wformat'> and run C. The compiler +will produce warning of incorrect use of format arguments. CHECK_FORMAT +changes perl-defined formats to common formats, so DO NOT USE the executable +produced by this process. + +A more accurate approach is the following commands: + + sh Configure -des -Dccflags=-Wformat ... + make miniperl # without -DCHECK_FORMAT + perl -i.orig -pwe 's/-Wformat/-DCHECK_FORMAT $&/' config.sh + sh Configure -S + make >& make.log # build from correct miniperl + make clean + make miniperl >& mini.log # build miniperl with -DCHECK_FORMAT + perl -nwe 'print if /^\S+:/ and not /^make\b/' mini.log make.log + make clean + +(-Wformat support by Robin Barker.) + +=back + =head1 Running Purify Purify is a commercial tool that is helpful in identifying memory