aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/c/c-typeck.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 1661747..7a0eda0 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-05 Marek Polacek <polacek@redhat.com>
+
+ PR c/64423
+ * c-typeck.c (build_array_ref): Pass loc down to
+ warn_array_subscript_with_type_char.
+
2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
* c-typeck.c: New behavious for pointers to arrays with qualifiers
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index abd452a..37beb64 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -2501,7 +2501,7 @@ build_array_ref (location_t loc, tree array, tree index)
/* ??? Existing practice has been to warn only when the char
index is syntactically the index, not for char[array]. */
if (!swapped)
- warn_array_subscript_with_type_char (index);
+ warn_array_subscript_with_type_char (loc, index);
/* Apply default promotions *after* noticing character types. */
index = default_conversion (index);