aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/typeck.c
diff options
context:
space:
mode:
authorShujing Zhao <pearly.zhao@oracle.com>2010-06-13 03:06:39 +0000
committerShujing Zhao <pzhao@gcc.gnu.org>2010-06-13 03:06:39 +0000
commit9d9f52d38bf5d6c113e3200fbb98e272ffb6ffe4 (patch)
tree00d20de4b6df5f3227611639ca735c07b6451c8e /gcc/cp/typeck.c
parent9fcb01de269e3035a766ef0f3397558b549388f9 (diff)
downloadgcc-9d9f52d38bf5d6c113e3200fbb98e272ffb6ffe4.zip
gcc-9d9f52d38bf5d6c113e3200fbb98e272ffb6ffe4.tar.gz
gcc-9d9f52d38bf5d6c113e3200fbb98e272ffb6ffe4.tar.bz2
typeck.c (convert_for_assignment): Fix comment.
2010-06-13 Shujing Zhao <pearly.zhao@oracle.com> * typeck.c (convert_for_assignment): Fix comment. Change message format from %d to %qP. (convert_for_initialization): Fix comment. From-SVN: r160671
Diffstat (limited to 'gcc/cp/typeck.c')
-rw-r--r--gcc/cp/typeck.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 75448d5..beef388 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -7186,10 +7186,11 @@ delta_from_ptrmemfunc (tree t)
}
/* Convert value RHS to type TYPE as preparation for an assignment to
- an lvalue of type TYPE. ERRTYPE is a string to use in error
- messages: "assignment", "return", etc. If FNDECL is non-NULL, we
- are doing the conversion in order to pass the PARMNUMth argument of
- FNDECL. */
+ an lvalue of type TYPE. ERRTYPE indicates what kind of error the
+ implicit conversion is. If FNDECL is non-NULL, we are doing the
+ conversion in order to pass the PARMNUMth argument of FNDECL.
+ If FNDECL is NULL, we are doing the conversion in function pointer
+ argument passing, conversion in initialization, etc. */
static tree
convert_for_assignment (tree type, tree rhs,
@@ -7331,7 +7332,7 @@ convert_for_assignment (tree type, tree rhs,
case ICR_DEFAULT_ARGUMENT:
if (fndecl)
warning (OPT_Wmissing_format_attribute,
- "parameter %d of %qD might be a candidate "
+ "parameter %qP of %qD might be a candidate "
"for a format attribute", parmnum, fndecl);
else
warning (OPT_Wmissing_format_attribute,
@@ -7386,7 +7387,7 @@ convert_for_assignment (tree type, tree rhs,
/* Convert RHS to be of type TYPE.
If EXP is nonzero, it is the target of the initialization.
- ERRTYPE is a string to use in error messages.
+ ERRTYPE indicates what kind of error the implicit conversion is.
Two major differences between the behavior of
`convert_for_assignment' and `convert_for_initialization'