Subject: CVS commit: gnusrc
To: None <source-changes@netbsd.org>
From: Bill Sommerfeld <sommerfeld@netbsd.org>
List: source-changes
Date: 10/04/2000 22:21:29
Module Name:	gnusrc
Committed By:	sommerfeld
Date:		Wed Oct  4 19:21:29 UTC 2000

Modified Files:
	gnusrc/gnu/dist/gcc: c-common.c c-decl.c toplev.c

Log Message:
Enhanced format string checking.

If -Wformat is enabled, try harder to chase down compile-time constant
format strings.. capable of catching things like:
	const char foo[]="%s %d";
	printf(foo, 1, "2");

If the new option -Wnetbsd-format-audit (no, I don't like the name,
either) is enabled, complain about non-constant format strings we
can't verify.  In particular, for *v*printf-like functions (i.e.,
non-variadic functions which are passed a va_list), insist that the
format string come from a parameter declared as a format string
argument, so that functions which should be declared as printflike are
caught at compile time.


To generate a diff of this commit:
cvs rdiff -r1.8 -r1.9 gnusrc/gnu/dist/gcc/c-common.c
cvs rdiff -r1.6 -r1.7 gnusrc/gnu/dist/gcc/c-decl.c
cvs rdiff -r1.1.1.3 -r1.2 gnusrc/gnu/dist/gcc/toplev.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.