Hi,
given that the current warn_args_num only outputs errors, never
warnings, I think we really want to rename it. Unless it's the wrong
time for such changes...?!?
Thanks,
Paolo.
///////////////////////
2015-07-09 Paolo Carlini <paolo.carl...@oracle.com>
* typeck.c (warn_args_num): Rename to error_args_num.
(convert_arguments): Adjust calls.
Index: typeck.c
===================================================================
--- typeck.c (revision 225556)
+++ typeck.c (working copy)
@@ -62,7 +62,7 @@ static void casts_away_constness_r (tree *, tree *
static bool casts_away_constness (tree, tree, tsubst_flags_t);
static bool maybe_warn_about_returning_address_of_local (tree);
static tree lookup_destructor (tree, tree, tree, tsubst_flags_t);
-static void warn_args_num (location_t, tree, bool);
+static void error_args_num (location_t, tree, bool);
static int convert_arguments (tree, vec<tree, va_gc> **, tree, int,
tsubst_flags_t);
@@ -3559,10 +3559,10 @@ cp_build_function_call_vec (tree function, vec<tre
}
/* Subroutine of convert_arguments.
- Warn about wrong number of args are genereted. */
+ Print an error message about a wrong number of arguments. */
static void
-warn_args_num (location_t loc, tree fndecl, bool too_many_p)
+error_args_num (location_t loc, tree fndecl, bool too_many_p)
{
if (fndecl)
{
@@ -3645,7 +3645,7 @@ convert_arguments (tree typelist, vec<tree, va_gc>
{
if (complain & tf_error)
{
- warn_args_num (input_location, fndecl, /*too_many_p=*/true);
+ error_args_num (input_location, fndecl, /*too_many_p=*/true);
return i;
}
else
@@ -3749,7 +3749,7 @@ convert_arguments (tree typelist, vec<tree, va_gc>
else
{
if (complain & tf_error)
- warn_args_num (input_location, fndecl, /*too_many_p=*/false);
+ error_args_num (input_location, fndecl, /*too_many_p=*/false);
return -1;
}
}