]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* c-typeck.c (convert_for_assignment): Improve commentary.
authorMarek Polacek <polacek@redhat.com>
Thu, 1 Oct 2015 10:14:39 +0000 (10:14 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 1 Oct 2015 10:14:39 +0000 (10:14 +0000)
From-SVN: r228327

gcc/c/ChangeLog
gcc/c/c-typeck.c

index 10ed324c9f5b23723eb4ec7400acaba61c4f2cf9..577fdc020bf0b3a2f460a71eab01ef8e85189664 100644 (file)
@@ -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
index a11ccb20b334ab7dd8c2a34727195044ad70257b..11e487c414b530b96d8b6df246a875e6457e2542 100644 (file)
@@ -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.  */