diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2004-06-30 23:30:34 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-06-30 23:30:34 +0100 |
commit | dd66b8e81e3182b520ea5de41e1f45ba8eaedf5d (patch) | |
tree | aee24b2a12a5ea311774eaf196ad657bc620dd50 /gcc/cp | |
parent | 0671a8a0b97ad91dcdaf7f0aaba0233ddaa5ac9d (diff) | |
download | gcc-dd66b8e81e3182b520ea5de41e1f45ba8eaedf5d.zip gcc-dd66b8e81e3182b520ea5de41e1f45ba8eaedf5d.tar.gz gcc-dd66b8e81e3182b520ea5de41e1f45ba8eaedf5d.tar.bz2 |
call.c (build_over_call), [...]): Call check_function_arguments instead of check_function_format.
cp:
* call.c (build_over_call), typeck.c (build_function_call): Call
check_function_arguments instead of check_function_format.
testsuite:
* g++.dg/warn/nonnull1.C: New test.
From-SVN: r83937
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/call.c | 5 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4174c40..4d15664 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,10 @@ 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk> + * call.c (build_over_call), typeck.c (build_function_call): Call + check_function_arguments instead of check_function_format. + +2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk> + * call.c (build_over_call), typeck.c (build_function_call): Update calls to check_function_format. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 290fd6b..76f0291 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4723,9 +4723,8 @@ build_over_call (struct z_candidate *cand, int flags) converted_args = nreverse (converted_args); - if (warn_format) - check_function_format (TYPE_ATTRIBUTES (TREE_TYPE (fn)), - converted_args); + check_function_arguments (TYPE_ATTRIBUTES (TREE_TYPE (fn)), + converted_args); /* Avoid actually calling copy constructors and copy assignment operators, if possible. */ diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 1dfb337..d099980 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -2483,10 +2483,10 @@ build_function_call (tree function, tree params) if (coerced_params == error_mark_node) return error_mark_node; - /* Check for errors in format strings. */ + /* Check for errors in format strings and inappropriately + null parameters. */ - if (warn_format) - check_function_format (TYPE_ATTRIBUTES (fntype), coerced_params); + check_function_arguments (TYPE_ATTRIBUTES (fntype), coerced_params); return build_cxx_call (function, coerced_params); } |