diff options
author | Joseph Myers <jsm28@cam.ac.uk> | 2000-07-31 08:00:34 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2000-07-31 08:00:34 -0600 |
commit | 980d86e9b4cfe0467ba30a928e0a5418e3a48410 (patch) | |
tree | a49627f6e179e7a5d90a8a91d584b0dc684056b6 /gcc | |
parent | 9c08f7e6be80912f87ec5258c2f29c5918d528f7 (diff) | |
download | gcc-980d86e9b4cfe0467ba30a928e0a5418e3a48410.zip gcc-980d86e9b4cfe0467ba30a928e0a5418e3a48410.tar.gz gcc-980d86e9b4cfe0467ba30a928e0a5418e3a48410.tar.bz2 |
c-common.c (init_function_format_info): Add C99 format functions in C99 mode.
* c-common.c (init_function_format_info): Add C99 format functions
in C99 mode.
From-SVN: r35380
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/c-common.c | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cd97f09..c2a385c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2000-07-31 Joseph S. Myers <jsm28@cam.ac.uk> + * c-common.c (init_function_format_info): Add C99 format functions + in C99 mode. + * c-decl.c (get_parm_info): Don't treat 'const void', 'volatile void' or 'register void' as being the special case of 'void' alone in a parameter list. diff --git a/gcc/c-common.c b/gcc/c-common.c index c7b5601..11f1649 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -1335,6 +1335,21 @@ init_function_format_info () record_function_format (get_identifier ("strftime"), NULL_TREE, strftime_format_type, 3, 0); + if (flag_isoc99) + { + /* ISO C99 adds the snprintf and vscanf family functions. */ + record_function_format (get_identifier ("snprintf"), NULL_TREE, + printf_format_type, 3, 4); + record_function_format (get_identifier ("vsnprintf"), NULL_TREE, + printf_format_type, 3, 0); + record_function_format (get_identifier ("vscanf"), NULL_TREE, + scanf_format_type, 1, 0); + record_function_format (get_identifier ("vfscanf"), NULL_TREE, + scanf_format_type, 2, 0); + record_function_format (get_identifier ("vsscanf"), NULL_TREE, + scanf_format_type, 2, 0); + } + record_international_format (get_identifier ("gettext"), NULL_TREE, 1); record_international_format (get_identifier ("dgettext"), NULL_TREE, 2); record_international_format (get_identifier ("dcgettext"), NULL_TREE, 2); |