aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.cc
diff options
context:
space:
mode:
authorRaphaël AMIARD <amiard@adacore.com>2024-08-29 12:43:54 +0200
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-10-08 10:37:13 +0200
commitcee753879cdb61c27dd584fcc4932969fb2cd0be (patch)
treec91aeb77022ff05a36aea05eb421b5f8d92c0027 /gcc/tree-ssa.cc
parenta6fc30b29f2e89057538500bb7cf2e233d4e5e41 (diff)
downloadgcc-cee753879cdb61c27dd584fcc4932969fb2cd0be.zip
gcc-cee753879cdb61c27dd584fcc4932969fb2cd0be.tar.gz
gcc-cee753879cdb61c27dd584fcc4932969fb2cd0be.tar.bz2
ada: Use semantics from the RFC for declarative items mixed with statements
We want to allow statements lists with declarations *and* an exception handler. What follows from this is that declarations declared in the statement list are *not* visible from the exception handler, and that the following code: declare A : Integer := 12; begin A : Integer := 15; <stmts> exception when others => ... Roughly expands to: declare A : Integer := 12; begin declare A : Integer := 15; begin <stmts> exception when others => ... As such, in the code above, there is no more error triggered for conflicting declarations of `A`. Move "Local declarations without block" into curated extensions Restrict legal local decls in statement lists Only accept object declarations & renamings, as well as use clauses for gcc/ada/ChangeLog: * par-ch11.adb (P_Sequence_Of_Statements): Remove Handled parameter. Always wrap the statements in a block when there are declarations in it. * par-ch5.adb: Adapt call to P_Sequence_Of_Statements Update outdated comment, remove useless `Style_Checks` pragma. (P_Sequence_Of_Statements): Don't emit an error in core extensions mode. Emit an error when a non valid declaration is parsed in sequence of statements. * par.adb: Adapt P_Sequence_Of_Statements' signature * doc/gnat_rm/gnat_language_extensions.rst: Adapt documentation now. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate.
Diffstat (limited to 'gcc/tree-ssa.cc')
0 files changed, 0 insertions, 0 deletions