aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@gcc.gnu.org>2016-04-06 23:07:21 +0000
committerPatrick Palka <ppalka@gcc.gnu.org>2016-04-06 23:07:21 +0000
commit6b37bdaff18303bdc1042d9b99f11f83ac836c13 (patch)
tree66367b6fb70f7e3bce2174c4c92500acc9eafd3b /gcc/omp-low.c
parent64824205cc9312e4e7798cda86a8e4c1f23e5d2b (diff)
downloadgcc-6b37bdaff18303bdc1042d9b99f11f83ac836c13.zip
gcc-6b37bdaff18303bdc1042d9b99f11f83ac836c13.tar.gz
gcc-6b37bdaff18303bdc1042d9b99f11f83ac836c13.tar.bz2
Fix new -Wparentheses warnings encountered during bootstrap
gcc/ChangeLog: PR c/70436 * gimplify.c (gimplify_omp_ordered): Add explicit braces to resolve a future -Wparentheses warning. * omp-low.c (scan_sharing_clauses): Likewise. * tree-parloops.c (eliminate_local_variables): Likewise. gcc/cp/ChangeLog: PR c/70436 * cp-tree.h (FOR_EACH_CLONE): Restructure macro to avoid potentially generating a future -Wparentheses warning in its callers. gcc/fortran/ChangeLog: PR c/70436 * openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a future -Wparentheses warning. gcc/testsuite/ChangeLog: PR c/70436 * g++.dg/plugin/pragma_plugin.c (handle_pragma_sayhello): Add explicit braces to resolve a future -Wparentheses warning. From-SVN: r234801
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 52a8005..6b7941d 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -2379,19 +2379,21 @@ scan_sharing_clauses (tree clauses, omp_context *ctx,
gcc_checking_assert (!scan_array_reductions
|| !is_gimple_omp_oacc (ctx->stmt));
if (scan_array_reductions)
- for (c = clauses; c; c = OMP_CLAUSE_CHAIN (c))
- if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_REDUCTION
- && OMP_CLAUSE_REDUCTION_PLACEHOLDER (c))
- {
- scan_omp (&OMP_CLAUSE_REDUCTION_GIMPLE_INIT (c), ctx);
- scan_omp (&OMP_CLAUSE_REDUCTION_GIMPLE_MERGE (c), ctx);
- }
- else if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_LASTPRIVATE
- && OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ (c))
- scan_omp (&OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ (c), ctx);
- else if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_LINEAR
- && OMP_CLAUSE_LINEAR_GIMPLE_SEQ (c))
- scan_omp (&OMP_CLAUSE_LINEAR_GIMPLE_SEQ (c), ctx);
+ {
+ for (c = clauses; c; c = OMP_CLAUSE_CHAIN (c))
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_REDUCTION
+ && OMP_CLAUSE_REDUCTION_PLACEHOLDER (c))
+ {
+ scan_omp (&OMP_CLAUSE_REDUCTION_GIMPLE_INIT (c), ctx);
+ scan_omp (&OMP_CLAUSE_REDUCTION_GIMPLE_MERGE (c), ctx);
+ }
+ else if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_LASTPRIVATE
+ && OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ (c))
+ scan_omp (&OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ (c), ctx);
+ else if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_LINEAR
+ && OMP_CLAUSE_LINEAR_GIMPLE_SEQ (c))
+ scan_omp (&OMP_CLAUSE_LINEAR_GIMPLE_SEQ (c), ctx);
+ }
}
/* Create a new name for omp child function. Returns an identifier. If