cuda.c: stmt_print_global_index: add extra parentheses around index expression
commit7e3a813f688232145d278bdecf7b85e2f311f898
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 8 Mar 2013 20:45:35 +0000 (8 21:45 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 8 Mar 2013 20:45:35 +0000 (8 21:45 +0100)
tree2660f826c401709cff2f2a72b949b21e7d9df27f
parente2af43ecf34b8cee4fe666c07f377d1ec2adf9c5
cuda.c: stmt_print_global_index: add extra parentheses around index expression

The index expression may contain operators (specifically ?:) that
have a lower precedence that + and so we have to make sure the
index expression is evaluated first.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
cuda.c