summaryrefslogtreecommitdiffstats
path: root/gcc/cp/typeck.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/typeck.c')
-rw-r--r--gcc/cp/typeck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 29f9e9daaee..ae2e5038e18 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -8332,7 +8332,7 @@ check_return_expr (tree retval, bool *no_warning)
*no_warning = false;
- if (flag_cilkplus && retval && TREE_CODE (retval) == CILK_SPAWN_STMT)
+ if (flag_cilkplus && retval && contains_cilk_spawn_stmt (retval))
{
error_at (EXPR_LOCATION (retval), "use of %<_Cilk_spawn%> in a return "
"statement is not allowed");
OpenPOWER on IntegriCloud