From: Andi Kleen Date: Tue, 11 Nov 2014 05:10:24 +0000 (+0000) Subject: Fix error location for cilk error message X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e64b984d9b74210d8a3db25791558f13a6004be4;p=gcc.git 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 * cilk.c (recognize_spawn): Use expression location for error message. From-SVN: r217333 --- diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index f0fa714cfbc..a4d0b81a7f9 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2014-11-10 Andi Kleen + + * cilk.c (recognize_spawn): Use expression location + for error message. + 2014-11-10 Paolo Carlini * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add. diff --git a/gcc/c-family/cilk.c b/gcc/c-family/cilk.c index f28a9d82804..60f7a2a5142 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; }