diff options
author | Marek Polacek <polacek@redhat.com> | 2015-10-01 10:14:39 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2015-10-01 10:14:39 +0000 |
commit | aabef2de2f99d4a67840480eddf224ca1b43320e (patch) | |
tree | 046ccdf307ab97558ba0af410ac07ca0fb729944 /gcc | |
parent | 228ae4702ca5dde9464e8f6f190deb639a59612b (diff) | |
download | gcc-aabef2de2f99d4a67840480eddf224ca1b43320e.zip gcc-aabef2de2f99d4a67840480eddf224ca1b43320e.tar.gz gcc-aabef2de2f99d4a67840480eddf224ca1b43320e.tar.bz2 |
* c-typeck.c (convert_for_assignment): Improve commentary.
From-SVN: r228327
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c/c-typeck.c | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 10ed324..577fdc0 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,7 @@ +2015-10-01 Marek Polacek <polacek@redhat.com> + + * c-typeck.c (convert_for_assignment): Improve commentary. + 2015-09-30 Marek Polacek <polacek@redhat.com> PR c/67730 diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index a11ccb2..11e487c 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -5690,8 +5690,18 @@ maybe_warn_string_init (location_t loc, tree type, struct c_expr expr) ERRTYPE says whether it is argument passing, assignment, initialization or return. - LOCATION is the location of the assignment, EXPR_LOC is the location of - the RHS or, for a function, location of an argument. + In the following example, '~' denotes where EXPR_LOC and '^' where + LOCATION point to: + + f (var); [ic_argpass] + ^ ~~~ + x = var; [ic_assign] + ^ ~~~; + int x = var; [ic_init] + ^^^ + return x; [ic_return] + ^ + FUNCTION is a tree for the function being called. PARMNUM is the number of the argument, for printing in error messages. */ |