diff mbox

[1/5] Fix error location for cilk error message

Message ID 1412224018-25368-1-git-send-email-andi@firstfloor.org
State New
Headers show

Commit Message

Andi Kleen Oct. 2, 2014, 4:26 a.m. UTC
From: Andi Kleen <ak@linux.intel.com>

Output the correct location for an existing cilk error message.

gcc/c-family/:

2014-09-28  Andi Kleen  <ak@linux.intel.com>

	* cilk.c (recognize_spawn): Use expression location
	for error message.
---
 gcc/c-family/cilk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Law Oct. 2, 2014, 6 p.m. UTC | #1
On 10/01/14 22:26, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> Output the correct location for an existing cilk error message.
>
> gcc/c-family/:
>
> 2014-09-28  Andi Kleen  <ak@linux.intel.com>
>
> 	* cilk.c (recognize_spawn): Use expression location
> 	for error message.'
OK.
Jeff
diff mbox

Patch

diff --git a/gcc/c-family/cilk.c b/gcc/c-family/cilk.c
index 20b3432..5b6684a 100644
--- a/gcc/c-family/cilk.c
+++ b/gcc/c-family/cilk.c
@@ -235,7 +235,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;
 }