diff options
author | Bruce Evans <bde@FreeBSD.org> | 1998-08-24 06:33:52 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 1998-08-24 06:33:52 +0000 |
commit | 0f79d73473ef584af008229e230ea553e52d659b (patch) | |
tree | d63b56f6d6795ace9aa484a6dcee80b93e45f4fe /contrib/gcc/toplev.c | |
parent | e2cadcb1bc6e3822d71813fd7a0915d6abb2c1b9 (diff) | |
download | src-0f79d73473ef584af008229e230ea553e52d659b.tar.gz src-0f79d73473ef584af008229e230ea553e52d659b.zip |
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.
Notes
Notes:
svn path=/head/; revision=38510
Diffstat (limited to 'contrib/gcc/toplev.c')
-rw-r--r-- | contrib/gcc/toplev.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/gcc/toplev.c b/contrib/gcc/toplev.c index 1b6fccb5d601..cf7ec18bfca6 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} }; |