From: Jose E. Marchesi Date: Sat, 27 Dec 2025 10:14:02 +0000 (+0100) Subject: a68: scope access clauses X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed0c185ac8b487a1647248799c5d4a915c6cfa3a;p=thirdparty%2Fgcc.git a68: scope access clauses Signed-off-by: Jose E. Marchesi gcc/algol68/ChangeLog * a68-parser-scope.cc (scope_access_clause): New function. (scope_enclosed_clause): Use scope_access_clause. --- diff --git a/gcc/algol68/a68-parser-scope.cc b/gcc/algol68/a68-parser-scope.cc index e76a3c04409..e04704e25b6 100644 --- a/gcc/algol68/a68-parser-scope.cc +++ b/gcc/algol68/a68-parser-scope.cc @@ -54,6 +54,7 @@ static void scope_statement (NODE_T *, SCOPE_T **); static void scope_enclosed_clause (NODE_T *, SCOPE_T **); static void scope_formula (NODE_T *, SCOPE_T **); static void scope_routine_text (NODE_T *, SCOPE_T **); +static void scope_access_clause (NODE_T *, SCOPE_T **); /* * Static scope checker. @@ -898,6 +899,18 @@ scope_loop_clause (NODE_T *p) } } +/* Scope and access-clause. */ + +static void +scope_access_clause (NODE_T *p, SCOPE_T **s) +{ + for (; p != NO_NODE; FORWARD (p)) + { + if (IS (p, ENCLOSED_CLAUSE)) + scope_enclosed_clause (SUB (p), s); + } +} + /* Scope_enclosed_clause. */ static void @@ -915,6 +928,8 @@ scope_enclosed_clause (NODE_T *p, SCOPE_T **s) scope_case_clause (SUB (p), s); else if (IS (p, LOOP_CLAUSE)) scope_loop_clause (SUB (p)); + else if (IS (p, ACCESS_CLAUSE)) + scope_access_clause (SUB (p), s); } /* Whether a symbol table contains no (anonymous) definition. */