public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2062] [Ada] Return when not working for procedures
@ 2021-07-06 14:48 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-06 14:48 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c7959e489dd324fb6c4266c01c2dd6afd1fabb34

commit r12-2062-gc7959e489dd324fb6c4266c01c2dd6afd1fabb34
Author: Justin Squirek <squirek@adacore.com>
Date:   Fri May 7 12:26:09 2021 -0400

    [Ada] Return when not working for procedures
    
    gcc/ada/
    
            * par-ch6.adb (Get_Return_Kind): Properly handle the case of a
            "return when" statement in the procedure case.

Diff:
---
 gcc/ada/par-ch6.adb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/ada/par-ch6.adb b/gcc/ada/par-ch6.adb
index 45a421420cb..23371756baf 100644
--- a/gcc/ada/par-ch6.adb
+++ b/gcc/ada/par-ch6.adb
@@ -1903,6 +1903,11 @@ package body Ch6 is
             end if;
 
             Restore_Scan_State (Scan_State); -- to identifier
+
+         elsif Token = Tok_When then
+            Error_Msg_GNAT_Extension ("return when statement");
+
+            Result := Return_When;
          end if;
 
          return Result;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-06 14:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 14:48 [gcc r12-2062] [Ada] Return when not working for procedures 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).