* [Ada] INOX: prototype "when" constructs
@ 2021-06-21 11:05 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-21 11:05 UTC (permalink / raw)
To: gcc-patches; +Cc: Justin Squirek
[-- Attachment #1: Type: text/plain, Size: 1935 bytes --]
This patch implements experimental features under the -gnatX flag for
"return ... when", "raise ... when", and "goto ... when" constructs.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/implementation_defined_pragmas.rst: Document new
feature under pragma Extensions_Allowed.
* gnat_rm.texi: Regenerate.
* errout.adb, errout.ads (Error_Msg_GNAT_Extension): Created to
issue errors when parsing extension only constructs.
* exp_ch11.adb, exp_ch11.ads (Expand_N_Raise_When_Statement):
Created to expand raise ... when constucts.
* exp_ch5.adb, exp_ch5.ads (Expand_N_Goto_When_Statement):
Created to expand goto ... when constructs.
* exp_ch6.adb, exp_ch6.ads (Expand_N_Return_When_Statement):
Created to expand return ... when constructs.
* expander.adb (Expand): Add case entries for "when" constructs.
* gen_il-gen-gen_nodes.adb, gen_il-types.ads: Add entries for
"when" constructs.
* par-ch11.adb (P_Raise_Statement): Add processing for raise ...
when.
* par-ch5.adb (Missing_Semicolon_On_Exit): Renamed to
Missing_Semicolon_On_When and moved to par-util.adb.
* par-ch6.adb (Get_Return_Kind): Renamed from Is_Simple and
processing added for "return ... when" return kind.
(Is_Simple): Renamed to Get_Return_Kind.
(P_Return_Statement): Add case for return ... when variant of
return statement.
* par-util.adb, par.adb (Missing_Semicolon_On_When): Added to
centeralize parsing of "when" keywords in the context of "when"
constructs.
* sem.adb (Analyze): Add case for "when" constructs.
* sem_ch11.adb, sem_ch11.ads (Analyze_Raise_When_Statement):
Created to analyze raise ... when constructs.
* sem_ch5.adb, sem_ch5.ads (Analyzed_Goto_When_Statement):
Created to analyze goto ... when constructs.
* sem_ch6.adb, sem_ch6.ads (Analyze_Return_When_Statement):
Created to analyze return ... when constructs.
* sprint.adb (Sprint_Node_Actual): Add entries for new "when"
nodes.
[-- Attachment #2: patch.diff.gz --]
[-- Type: application/gzip, Size: 5868 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-21 11:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 11:05 [Ada] INOX: prototype "when" constructs Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).