diff options
author | Joseph Myers <jsm28@cam.ac.uk> | 2000-08-21 15:30:38 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2000-08-21 15:30:38 +0100 |
commit | 93e2382f2cf48b874a5f2ff6359f134878498b69 (patch) | |
tree | cbd1a1410505f0820a83aa92687d31f4e159e3d8 /gcc/c-decl.c | |
parent | f3d360aad1dbc188c0f0bbe7d44a32bdb20cd62c (diff) | |
download | gcc-93e2382f2cf48b874a5f2ff6359f134878498b69.zip gcc-93e2382f2cf48b874a5f2ff6359f134878498b69.tar.gz gcc-93e2382f2cf48b874a5f2ff6359f134878498b69.tar.bz2 |
c-tree.h (flag_hosted): Move declaration from here...
* c-tree.h (flag_hosted): Move declaration from here...
* c-common.h (flag_hosted): ... to here.
(flag_noniso_default_format_attributes): New declaration.
* c-decl.c (flag_noniso_default_format_attributes): New variable.
(c_decode_option): Set it appropriately for options choosing
language standard variant.
* c-common.c (init_function_format_info): Only provide default
format attributes if flag_hosted. Only provide the gettext
formats if flag_noniso_default_format_attributes. Update
comments.
(check_format_info): Disable treatment of %a as a scanf flag in
C99 mode.
cp:
* decl.c (flag_hosted, flag_noniso_default_format_attributes): New
variables.
* decl2.c (lang_decode_option): Disable gettext attributes for
-ansi.
From-SVN: r35843
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 48e842e..c9afb28 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -345,6 +345,11 @@ int flag_digraphs = 1; int flag_hosted = 1; +/* Nonzero means add default format_arg attributes for functions not + in ISO C. */ + +int flag_noniso_default_format_attributes = 1; + /* Nonzero means to allow single precision math even if we're generally being traditional. */ int flag_allow_single_precision = 0; @@ -550,6 +555,7 @@ c_decode_option (argc, argv) flag_writable_strings = 0; flag_no_asm = 1; flag_no_nonansi_builtin = 1; + flag_noniso_default_format_attributes = 0; flag_isoc99 = 0; } else if (!strcmp (argstart, "iso9899:199409")) @@ -567,6 +573,7 @@ c_decode_option (argc, argv) flag_writable_strings = 0; flag_no_asm = 1; flag_no_nonansi_builtin = 1; + flag_noniso_default_format_attributes = 0; flag_isoc99 = 1; flag_digraphs = 1; flag_isoc94 = 1; @@ -577,6 +584,7 @@ c_decode_option (argc, argv) flag_writable_strings = 0; flag_no_asm = 0; flag_no_nonansi_builtin = 0; + flag_noniso_default_format_attributes = 1; flag_isoc99 = 0; flag_digraphs = 1; flag_isoc94 = 0; @@ -587,6 +595,7 @@ c_decode_option (argc, argv) flag_writable_strings = 0; flag_no_asm = 0; flag_no_nonansi_builtin = 0; + flag_noniso_default_format_attributes = 1; flag_isoc99 = 1; flag_digraphs = 1; flag_isoc94 = 1; |