develooper Front page | perl.perl5.porters | Postings from January 2005

[PATCH] to improve -DCHECK_FORMAT

Thread Next
From:
Robin Barker
Date:
January 5, 2005 03:55
Subject:
[PATCH] to improve -DCHECK_FORMAT
Message ID:
533D273D4014D411AB1D00062938C4D90849C55A@hotel.npl.co.uk
This patch improves the behaviour of building perl under -DCHECK_FORMAT
to produce a properly functioning executable (passes all tests).

It does this by replacing the formats
	%_		by %-p
	%.256_	by %-256p
	%vd		by %-1p

There are then hacks in sv.c to trap these special cases
and "do the right thing".

All the extra code is surrounded by ifdef CHECK_FORMAT, so
there is no impact on the real code.

Summary
	make all test	- OK

	make all OPTIMIZE=-DCHECK_FORMAT\ -Wformat
				- finds format errors, as before
	make test OPTIMIZE=-DCHECK_FORMAT\ -Wformat
				- OK

Robin




-------------------------------------------------------------------
This e-mail and any attachments may contain confidential and/or
privileged material; it is for the intended addressee(s) only.
If you are not a named addressee, you must not use, retain or
disclose such information.

NPL Management Ltd cannot guarantee that the e-mail or any
attachments are free from viruses.

NPL Management Ltd. Registered in England and Wales. No: 2937881
Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW.
-------------------------------------------------------------------
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About