aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.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/fortran/openmp.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/fortran/openmp.c')
-rw-r--r--gcc/fortran/openmp.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index a6c39cd..0dd1a92 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -175,24 +175,26 @@ gfc_find_omp_udr (gfc_namespace *ns, const char *name, gfc_typespec *ts)
st = gfc_find_symtree (ns->omp_udr_root, name);
if (st != NULL)
- for (omp_udr = st->n.omp_udr; omp_udr; omp_udr = omp_udr->next)
- if (ts == NULL)
- return omp_udr;
- else if (gfc_compare_types (&omp_udr->ts, ts))
- {
- if (ts->type == BT_CHARACTER)
- {
- if (omp_udr->ts.u.cl->length == NULL)
- return omp_udr;
- if (ts->u.cl->length == NULL)
- continue;
- if (gfc_compare_expr (omp_udr->ts.u.cl->length,
- ts->u.cl->length,
- INTRINSIC_EQ) != 0)
- continue;
- }
+ {
+ for (omp_udr = st->n.omp_udr; omp_udr; omp_udr = omp_udr->next)
+ if (ts == NULL)
return omp_udr;
- }
+ else if (gfc_compare_types (&omp_udr->ts, ts))
+ {
+ if (ts->type == BT_CHARACTER)
+ {
+ if (omp_udr->ts.u.cl->length == NULL)
+ return omp_udr;
+ if (ts->u.cl->length == NULL)
+ continue;
+ if (gfc_compare_expr (omp_udr->ts.u.cl->length,
+ ts->u.cl->length,
+ INTRINSIC_EQ) != 0)
+ continue;
+ }
+ return omp_udr;
+ }
+ }
/* Don't escape an interface block. */
if (ns && !ns->has_import_set