From: Kwok Cheung Yeung <kcye...@baylibre.com>

The final 'else' when checking the motion modifiers is nested one level
too deep.

This patch should be folded into "OpenMP: Enable 'declare mapper' mappers for
'target update' directives" when merging to mainline.

gcc/cp/ChangeLog:

        * parser.cc (cp_parser_omp_clause_from_to): Move an "else" clause to
        a higher nesting level.
---
 gcc/cp/parser.cc | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index 4157d912039..f52446c5e46 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -42058,16 +42058,16 @@ cp_parser_omp_clause_from_to (cp_parser *parser, enum 
omp_clause_code kind,
              mapper_modifier = true;
              pos += 3;
            }
-         else
-           {
-             cp_parser_error (parser, "%<to%> or %<from%> clause with "
-                              "modifier other than %<present%> or %<mapper%>");
-             cp_parser_skip_to_closing_parenthesis (parser,
-                                                    /*recovering=*/true,
-                                                    /*or_comma=*/false,
-                                                    /*consume_paren=*/true);
-             return list;
-           }
+       }
+      else
+       {
+         cp_parser_error (parser, "%<to%> or %<from%> clause with "
+                          "modifier other than %<present%> or %<mapper%>");
+         cp_parser_skip_to_closing_parenthesis (parser,
+                                                /*recovering=*/true,
+                                                /*or_comma=*/false,
+                                                /*consume_paren=*/true);
+         return list;
        }
     }
 
-- 
2.46.0

Reply via email to