aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2014-11-11 05:10:24 +0000
committerAndi Kleen <ak@gcc.gnu.org>2014-11-11 05:10:24 +0000
commite64b984d9b74210d8a3db25791558f13a6004be4 (patch)
treef206602e6dcea7e90bd98915d8ffa3604ea673f1 /gcc
parent618b7f293745ac92cc4fef113239e84f79c4d4ff (diff)
downloadgcc-e64b984d9b74210d8a3db25791558f13a6004be4.zip
gcc-e64b984d9b74210d8a3db25791558f13a6004be4.tar.gz
gcc-e64b984d9b74210d8a3db25791558f13a6004be4.tar.bz2
Fix error location for cilk error message
Output the correct location for an existing cilk error message. gcc/c-family/: 2014-11-10 Andi Kleen <ak@linux.intel.com> * cilk.c (recognize_spawn): Use expression location for error message. From-SVN: r217333
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/cilk.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index f0fa714..a4d0b81 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-10 Andi Kleen <ak@linux.intel.com>
+
+ * cilk.c (recognize_spawn): Use expression location
+ for error message.
+
2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
* c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
diff --git a/gcc/c-family/cilk.c b/gcc/c-family/cilk.c
index f28a9d8..60f7a2a 100644
--- a/gcc/c-family/cilk.c
+++ b/gcc/c-family/cilk.c
@@ -247,7 +247,7 @@ recognize_spawn (tree exp, tree *exp0)
}
/* _Cilk_spawn can't be wrapped in expression such as PLUS_EXPR. */
else if (contains_cilk_spawn_stmt (exp))
- error ("invalid use of %<_Cilk_spawn%>");
+ error_at (EXPR_LOCATION (exp), "invalid use of %<_Cilk_spawn%>");
return spawn_found;
}