diff options
Diffstat (limited to 'gcc/ada/switch-c.adb')
-rw-r--r-- | gcc/ada/switch-c.adb | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index c6eb063..020be63 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2020, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2021, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -112,7 +112,7 @@ package body Switch.C is when '3' => if Standard_Long_Long_Integer_Size /= 64 then - Bad_Switch ("-gnato3 not implemented for this configuration"); + Bad_Switch ("-gnato3 requires Long_Long_Integer'Size = 64"); else return Eliminated; end if; @@ -427,7 +427,7 @@ package body Switch.C is -- The reason for this prohibition is that the rewriting of -- Sloc values causes strange malfunctions in the tests of -- whether units belong to the main source. This is really a - -- bug, but too hard to fix for a marginal capability ??? + -- bug, but too hard to fix for a marginal capability. -- The proper fix is to completely redo -gnatD processing so -- that the tree is not messed with, and instead a separate @@ -929,14 +929,7 @@ package body Switch.C is Ptr := Ptr + 1; C := Switch_Chars (Ptr); - if C in '1' .. '5' - or else C = '8' - or else C = '9' - or else C = 'p' - or else C = 'f' - or else C = 'n' - or else C = 'w' - then + if C in '1' .. '5' | '8' | 'p' | '9' | 'f' | 'n' | 'w' then Identifier_Character_Set := C; Ptr := Ptr + 1; @@ -1399,9 +1392,8 @@ package body Switch.C is when 'X' => Ptr := Ptr + 1; - Extensions_Allowed := True; - Ada_Version := Ada_Version_Type'Last; - Ada_Version_Explicit := Ada_Version_Type'Last; + Ada_Version := Ada_With_Extensions; + Ada_Version_Explicit := Ada_With_Extensions; Ada_Version_Pragma := Empty; -- -gnaty (style checks) @@ -1588,8 +1580,10 @@ package body Switch.C is elsif Switch_Chars (Ptr .. Ptr + 3) = "2012" then Ada_Version := Ada_2012; - elsif Switch_Chars (Ptr .. Ptr + 3) = "2020" then - Ada_Version := Ada_2020; + elsif Switch_Chars (Ptr .. Ptr + 3) = "2020" + or else Switch_Chars (Ptr .. Ptr + 3) = "2022" + then + Ada_Version := Ada_2022; else Bad_Switch ("-gnat" & Switch_Chars (Ptr .. Ptr + 3)); @@ -1620,11 +1614,6 @@ package body Switch.C is Ptr := Ptr + 1; end if; - -- We ignore '/' in switches, this is historical, still needed??? - - when '/' => - Store_Switch := False; - -- Anything else is an error (illegal switch character) when others => |