summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/toplev.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-08-24 06:33:52 +0000
committerbde <bde@FreeBSD.org>1998-08-24 06:33:52 +0000
commitf0825df2782f486722ece766eb1442debffcfc7c (patch)
tree2c0b7085e4925b2a1773ce56247a6c51a8cb7808 /contrib/gcc/toplev.c
parent4ce525c0fd15056ead6463b1dcd8b5a242506b71 (diff)
downloadFreeBSD-src-f0825df2782f486722ece766eb1442debffcfc7c.zip
FreeBSD-src-f0825df2782f486722ece766eb1442debffcfc7c.tar.gz
Support printf format checking of FreeBSD kernel formats %[Dbrz].
This is enabled by the undocumented option -fformat-extensions. This option should be named better and/or give more control over the extensions. Fixed a message - don't warn about the field width when it's the precision that has the wrong type. Didn't fix excessive checking for the precision relative to the type - ANSI requires both to be ints, but gcc permits the field width to be either int or unsigned int.
Diffstat (limited to 'contrib/gcc/toplev.c')
-rw-r--r--contrib/gcc/toplev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/gcc/toplev.c b/contrib/gcc/toplev.c
index 1b6fccb..cf7ec18 100644
--- a/contrib/gcc/toplev.c
+++ b/contrib/gcc/toplev.c
@@ -521,6 +521,10 @@ int flag_gnu_linker = 1;
/* Tag all structures with __attribute__(packed) */
int flag_pack_struct = 0;
+/* Nonzero means that -Wformat accepts certain system-dependent formats. */
+
+int flag_format_extensions = 0;
+
/* Table of language-independent -f options.
STRING is the option name. VARIABLE is the address of the variable.
ON_VALUE is the value to store in VARIABLE
@@ -567,6 +571,7 @@ struct { char *string; int *variable; int on_value;} f_options[] =
{"verbose-asm", &flag_verbose_asm, 1},
{"gnu-linker", &flag_gnu_linker, 1},
{"pack-struct", &flag_pack_struct, 1},
+ {"format-extensions", &flag_format_extensions, 1},
{"bytecode", &output_bytecode, 1}
};
OpenPOWER on IntegriCloud