aboutsummaryrefslogtreecommitdiff
path: root/libjava/include/java-stack.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2014-11-11 05:10:58 +0000
committerAndi Kleen <ak@gcc.gnu.org>2014-11-11 05:10:58 +0000
commite5e442524724592b9f6e969354ba33c4f20f6ab2 (patch)
tree71d74f86916e6654aeaf8532ad17469a9101b2cd /libjava/include/java-stack.h
parent300553307af73f9a4ba83affc62c8263d3b90f9e (diff)
downloadgcc-e5e442524724592b9f6e969354ba33c4f20f6ab2.zip
gcc-e5e442524724592b9f6e969354ba33c4f20f6ab2.tar.gz
gcc-e5e442524724592b9f6e969354ba33c4f20f6ab2.tar.bz2
Error out for Cilk_spawn or array expression in forbidden places
_Cilk_spawn or Cilk array expressions are only allowed on their own, but not in for(), if(), switch, do, while, goto, etc. The C parser didn't always check for that, which lead to ICEs earlier for invalid code. Add a generic helper that checks this and call it where needed in the C frontend. I chose to allow spawn/array for for init and increment expressions. While the Cilk spec could be interpreted to forbid it there too there didn't seem any reason to not allow it. One dark corner is spawn, array in statement expressions not at the end. Right now that's forbidden too. gcc/c-family/: 2014-11-10 Andi Kleen <ak@linux.intel.com> PR c/60804 * c-common.h (check_no_cilk): Declare. * cilk.c (get_error_location): New function. (check_no_cilk): Dito. gcc/c/: 2014-11-10 Andi Kleen <ak@linux.intel.com> PR c/60804 * c-parser.c (c_parser_statement_after_labels): Call check_no_cilk. (c_parser_if_statement): Dito. (c_parser_switch_statement): Dito. (c_parser_while_statement): Dito. (c_parser_do_statement): Dito. (c_parser_for_statement): Dito. * c-typeck.c (c_finish_loop): Dito. From-SVN: r217336
Diffstat (limited to 'libjava/include/java-stack.h')
0 files changed, 0 insertions, 0 deletions