summaryrefslogtreecommitdiff
path: root/Porting/pumpkin.pod
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>2000-09-14 19:07:38 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-09-14 17:45:35 +0000
commitd2560b705d852dbc96fd94b95faaa076758b7a8c (patch)
tree801efa93c2b2e08931c3a2f8355b8fb9d8c62395 /Porting/pumpkin.pod
parent183a2d84c1f59ccc4c14106315b4806f773a1203 (diff)
downloadperl-d2560b705d852dbc96fd94b95faaa076758b7a8c.tar.gz
continued -Wformat support
Message-Id: <200009141707.SAA13276@tempest.npl.co.uk> p4raw-id: //depot/perl@7081
Diffstat (limited to 'Porting/pumpkin.pod')
-rw-r--r--Porting/pumpkin.pod28
1 files changed, 28 insertions, 0 deletions
diff --git a/Porting/pumpkin.pod b/Porting/pumpkin.pod
index 99776b50d2..d7610595f0 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<Configure> with
+S<-Dccflags='-DCHECK_FORMAT -Wformat'> and run C<make>. 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