diff options
author | Marc Poulhiès <poulhies@adacore.com> | 2021-11-05 10:24:27 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-12-02 16:26:27 +0000 |
commit | b045f2f2205495b61d63133b16e56c35acbf8090 (patch) | |
tree | 6859fd4188a8fde717377e47a344a30411a8cfbf /gcc | |
parent | aa937f2cdb8ff6b2dce0b6f3042efe700bd437ec (diff) | |
download | gcc-b045f2f2205495b61d63133b16e56c35acbf8090.zip gcc-b045f2f2205495b61d63133b16e56c35acbf8090.tar.gz gcc-b045f2f2205495b61d63133b16e56c35acbf8090.tar.bz2 |
[Ada] Use bracket aggregates in Ada2022
gcc/ada/
* exp_imgv.adb (Append_Table_To): Add new parameter to
Make_Aggregate call.
* gen_il-fields.ads (Opt_Field_Enum):
Add Is_Parenthesis_Aggregate and Is_Enum_Array_Aggregate.
* gen_il-gen-gen_nodes.adb (Union): Add Is_Enum_Array_Aggregate
and Is_Parenthesis_Aggregate field to N_Aggregate.
* libgnarl/s-interr.adb (User_Handler, User_Entry, Blocked)
(Ignored, Last_Unblocker, Server_ID): Likewise.
* libgnarl/s-intman.ads (Keep_Unmasked, Reserve): Likewise.
* libgnarl/s-intman__posix.adb (Exception_Interrupts)
(Initialize): Likewise.
* libgnarl/s-mudido__affinity.adb (Create): Likewise.
* libgnarl/s-osinte__linux.ads (Unmasked, Reserved): Likewise.
* libgnarl/s-taprop__linux.adb (Create_Task, Set_Task_Affinity)
* libgnarl/s-tasdeb.adb (Trace_On): Likewise.
* libgnarl/s-tasdeb.ads (Known_Tasks): Likewise.
* libgnarl/s-tasinf__linux.ads (Any_CPU, No_CPU): Likewise.
* libgnarl/s-taskin.adb (Initialize_ATCB): Likewise.
* libgnarl/s-taskin.ads (Ada_Task_Control_Block): Likewise.
* libgnarl/s-tasren.adb (Default_Treatment)
(New_State): Likewise.
* libgnarl/s-tassta.adb (Trace_Unhandled_Exception_In_Task):
Likewise.
* libgnarl/s-tataat.adb (Index_Array): Likewise.
* libgnarl/s-tpobop.adb (New_State): Likewise.
* libgnat/a-calend.adb (Cumulative_Days_Before_Month)
(Leap_Second_Times): Likewise.
* libgnat/a-calend.ads (Days_In_Month): Likewise.
* libgnat/a-cfinve.adb (Insert): Likewise.
* libgnat/a-chahan.adb (Char_Map): Likewise.
* libgnat/a-chtgbo.adb (Clear): Likewise.
* libgnat/a-cobove.adb ("&", Insert, To_Vector): Likewise.
* libgnat/a-cofove.adb (Insert, To_Vector): Likewise.
* libgnat/a-cohata.ads (Hash_Table_Type): Likewise.
* libgnat/a-coinve.adb (Merge, Insert, Insert_Space): Likewise.
* libgnat/a-convec.adb (Insert, To_Vector): Likewise.
* libgnat/a-coprnu.ads (Primes): Likewise.
* libgnat/a-direct.adb (Empty_String): Use regular "" instead
of aggregate.
(Start_Search_Internal, Name_Case_Equivalence, Search)
(Start_Search, Start_Search_Internal): Use bracket for
aggregate.
* libgnat/a-direct.ads (Start_Search,Search): Likewise.
* libgnat/a-direio.adb (Zeroes): Likewise.
* libgnat/a-nbnbre.adb (Leading_Padding, Trailing_Padding)
(Numerator_Image): Likewise.
* libgnat/a-ngrear.adb (Jacobi): Likewise.
* libgnat/a-stbubo.adb (Get_UTF_8): Likewise.
* libgnat/a-stbufo.adb (Put): Likewise.
* libgnat/a-stbuun.adb (Get_UTF_8): Likewise.
* libgnat/a-stbuut.adb (Put_7bit, Put_Character)
(Put_Wide_Character, Put_Wide_Wide_Character): Likewise.
* libgnat/a-stmaco.ads (Control_Set,Graphic_Set,Letter_Set)
(Lower_Set, Upper_Set, Basic_Set, Decimal_Digit_Set)
(Hexadecimal_Digit_Set, Alphanumeric_Set, Special_Set)
(ISO_646_Set): Likewise.
* libgnat/a-strbou.ads (Insert, Tail, "*", Replicate)
(Null_Bounded_String): Likewise.
* libgnat/a-strfix.ads (Head, Tail): Likewise.
* libgnat/a-strmap.adb (To_Domain, Lemma_Is_Sorted): Likewise.
* libgnat/a-strmap.ads (Null_Set): Likewise.
* libgnat/a-strsup.adb (Super_Head, Super_Replicate)
(Super_Tail): Likewise.
* libgnat/a-strsup.ads (Super_Head, Super_Tail, Times)
(Super_Replicate): Likewise.
* libgnat/a-sttebu.adb (Put_UTF8, Wide_Put_UTF_16): Likewise.
* libgnat/a-stuten.ads (BOM_16): Likewise.
* libgnat/a-stwibo.ads (Null_Bounded_Wide_String): Likewise.
* libgnat/a-stwima.ads (Null_Range): Likewise.
* libgnat/a-stwisu.adb (Super_Head, Super_Replicate)
(Super_Tail): Likewise.
* libgnat/a-stzbou.ads
(Null_Bounded_Wide_Wide_String): Likewise.
* libgnat/a-stzmap.ads (Null_Range): Likewise.
* libgnat/a-stzsup.adb (Super_Head, Super_Replicate)
(Super_Tail, Super_Trim): Likewise.
* libgnat/a-swmwco.ads (Control_Ranges, Graphic_Ranges)
(Letter_Ranges, Lower_Ranges, Upeer_Ranges, Basic_Ranges)
(Decimal_Digit_Ranges, Hexadecimal_Digit_Ranges)
(Alphanumeric_Ranges, Special_Graphic_Ranges, ISO_646_Ranges)
(Character_Ranges, Lower_Case_Mapping, Upper_Case_Mapping)
(Basic_Mapping): Likewise.
* libgnat/a-szmzco.ads (Control_Ranges, Graphic_Ranges)
(Letter_Ranges, Lower_Ranges, Upeer_Ranges, Basic_Ranges)
(Decimal_Digit_Ranges, Hexadecimal_Digit_Ranges)
(Alphanumeric_Ranges, Special_Graphic_Ranges, ISO_646_Ranges)
(Character_Ranges, Lower_Case_Mapping, Upper_Case_Mapping)
(Basic_Mapping): Likewise.
* libgnat/a-teioed.adb (Format_Number): Likewise.
* libgnat/a-wtedit.adb (Format_Number): Likewise.
* libgnat/a-ztedit.adb (Format_Number): Likewise.
* libgnat/g-arrspl.adb (Separators): Likewise.
* libgnat/g-catiio.adb (Month_Name_To_Number): Likewise.
* libgnat/g-cgideb.adb (NL, Title): Likewise.
* libgnat/g-comlin.adb (Internal_Initialize_Option_Scan)
(Display_Section_Help): Likewise.
* libgnat/g-comlin.ads (Opt_Parser_Data): Likewise.
* libgnat/g-debpoo.adb (Set_Dead_Beef, Dump): Likewise.
* libgnat/g-expect.adb (Expect, Has_Process, Send): Likewise.
* libgnat/g-forstr.adb ("+", Get_Formatted): Likewise.
* libgnat/g-memdum.adb (Dump): Likewise.
* libgnat/g-rannum.adb (Image): Likewise.
* libgnat/g-sechas.adb (Final, HMAC_Initial_Context): Likewise.
* libgnat/g-sehamd.ads (Initial_State): Likewise.
* libgnat/g-sehash.ads (Initial_State): Likewise.
* libgnat/g-sercom.ads (Data_Rate_Value): Likewise.
* libgnat/g-sercom__linux.adb (C_Data_Rate, C_Bits, C_Stop_Bits)
(C_Parity): Likewise.
* libgnat/g-shsh32.ads (K, Transform): Likewise.
* libgnat/g-shsh64.ads (K, Transform): Likewise.
* libgnat/g-socket.adb (Levels, Modes, Shutmodes, Requests)
(Options, Flags, Get_Name_Info, Image): Likewise.
* libgnat/g-socket.ads (Inet_Addr_Bytes_Length, Inet_Addr_Type)
(IPv4_To_IPv6_Prefix, Any_Inet_Addr, Any_Inet6_Addr)
(No_Inet_Addr, Broadcast_Inet_Addr, Loopback_Inet_Addr)
(Loopback_Inet6_Addr, Unspecified_Group_Inet_Addr)
(All_Hosts_Group_Inet_Addr, All_Routers_Group_Inet_Addr)
(Unspecified_Group_Inet6_Addr, All_Hosts_Group_Inet6_Addr)
(All_Routers_Group_Inet6_Addr): Likewise.
* libgnat/g-socpol.adb (To_C, Status, Get_Events): Likewise.
* libgnat/g-socpol.ads (Input_Event, Output_Event, Both_Event)
(Error_Event): Likewise.
* libgnat/g-sothco.ads (Families, Lengths, Sockaddr): Likewise.
* libgnat/g-spipat.adb (OK_For_Simple_Arbno): Likewise.
* libgnat/i-cobol.ads (Ada_To_COBOL, COBOL_To_Ada): Likewise.
* libgnat/i-pacdec.adb (Packed_Byte): Likewise.
* libgnat/i-pacdec.ads (Packed_Size): Likewise.
* libgnat/s-bitops.adb (Masks): Likewise.
* libgnat/s-crc32.adb (Table): Likewise.
* libgnat/s-gearop.adb (Unit_Matrix, Unit_Vector): Likewise.
* libgnat/s-genbig.adb (Out_data, Zero_Data, Big_Exp, Big_Mul)
(To_Bignum, To_String, Image, Leading_Padding): Likewise.
* libgnat/s-htable.adb (Reset): Likewise.
* libgnat/s-imgcha.adb (C0, C1): Likewise.
* libgnat/s-powflt.ads (Powten): Likewise.
* libgnat/s-powlfl.ads (Powten): Likewise.
* libgnat/s-powllf.ads (Powten): Likewise.
* libgnat/s-rannum.adb (Matrix_A, Random_Float_Template, Image):
Likewise.
* libgnat/s-rannum.ads (Generator): Likewise.
* libgnat/s-regexp.adb (Compile,Create_Primary_Table)
(Create_Primary_Table_Glob, Create_Secondary_Table, Compile):
Likewise.
* libgnat/s-regpat.adb (Bit_Conversion, Set, Dump_Until)
(Dump_Current, Dump_Error, Try, Reset_Class): Likewise.
* libgnat/s-regpat.ads (Pattern_Matcher, Never_Match): Likewise.
* libgnat/s-scaval__128.adb (Initialize): Likewise.
* libgnat/s-statxd.adb (Fields, W_F, W_LF)
(W_LLF, W_SF): Likewise.
* libgnat/s-stausa.adb (Initialize, Initialize_Analyzer)
(Output_Results): Likewise.
* libgnat/s-strops.adb (Str_Concat_SC): Likewise.
* libgnat/s-valrea.adb (Maxexp32, Maxexp64, Maxexp80): Likewise.
* libgnat/s-wchcon.ads (WC_Encoding_Letters)
(WC_Longest_Sequences): Likewise.
* par-ch4.adb (P_Aggregate_Or_Paren_Expr): Set
Is_Parenthesis_Aggregate when creating a N_Aggregate using
parenthesis.
* scng.adb (Scan): Lower version needed for bracket syntax from
Extensions to Ada2022.
* sem_aggr.adb (Resolve_Aggregate): Raise error for container
aggregate using parenthesis instead of bracket.
(Resolve_Array_Aggregate): Raise warning for aggregate using
parenthesis in Ada2022 with obsolescent warning enabled and not
in GNAT mode.
* sem_util.ads (Check_Ambiguous_Aggregate): Typo fix in comment.
Diffstat (limited to 'gcc')
108 files changed, 652 insertions, 624 deletions
diff --git a/gcc/ada/exp_imgv.adb b/gcc/ada/exp_imgv.adb index 69b9f2d..f2c5129 100644 --- a/gcc/ada/exp_imgv.adb +++ b/gcc/ada/exp_imgv.adb @@ -159,7 +159,8 @@ package body Exp_Imgv is Make_Component_Definition (Loc, Aliased_Present => False, Subtype_Indication => New_Occurrence_Of (Ctyp, Loc))), - Expression => Make_Aggregate (Loc, Expressions => V))); + Expression => Make_Aggregate (Loc, Expressions => V, + Is_Enum_Array_Aggregate => True))); end Append_Table_To; -- Start of Build_Enumeration_Image_Tables diff --git a/gcc/ada/gen_il-fields.ads b/gcc/ada/gen_il-fields.ads index f3f3ca4..ca3439e 100644 --- a/gcc/ada/gen_il-fields.ads +++ b/gcc/ada/gen_il-fields.ads @@ -258,6 +258,8 @@ package Gen_IL.Fields is Is_Folded_In_Parser, Is_Generic_Contract_Pragma, Is_Homogeneous_Aggregate, + Is_Parenthesis_Aggregate, + Is_Enum_Array_Aggregate, Is_Ignored, Is_Ignored_Ghost_Pragma, Is_In_Discriminant_Check, diff --git a/gcc/ada/gen_il-gen-gen_nodes.adb b/gcc/ada/gen_il-gen-gen_nodes.adb index 9937919..9f9fef9 100644 --- a/gcc/ada/gen_il-gen-gen_nodes.adb +++ b/gcc/ada/gen_il-gen-gen_nodes.adb @@ -481,7 +481,9 @@ begin -- Gen_IL.Gen.Gen_Nodes (Sy (Expressions, List_Id, Default_No_List), Sy (Component_Associations, List_Id, Default_No_List), Sy (Null_Record_Present, Flag), + Sy (Is_Parenthesis_Aggregate, Flag), Sy (Is_Homogeneous_Aggregate, Flag), + Sy (Is_Enum_Array_Aggregate, Flag), Sm (Aggregate_Bounds, Node_Id), Sm (Entity_Or_Associated_Node, Node_Id), -- just Associated_Node Sm (Compile_Time_Known_Aggregate, Flag), diff --git a/gcc/ada/libgnarl/s-interr.adb b/gcc/ada/libgnarl/s-interr.adb index 7d36b9f..dc1ed17 100644 --- a/gcc/ada/libgnarl/s-interr.adb +++ b/gcc/ada/libgnarl/s-interr.adb @@ -159,7 +159,7 @@ package body System.Interrupts is end record; User_Handler : array (Interrupt_ID'Range) of Handler_Assoc := - (others => (null, Static => False)); + [others => (null, Static => False)]; pragma Volatile_Components (User_Handler); -- Holds the protected procedure handler (if any) and its Static -- information for each interrupt. A handler is a Static one if it is @@ -167,27 +167,27 @@ package body System.Interrupts is -- not static) User_Entry : array (Interrupt_ID'Range) of Entry_Assoc := - (others => (T => Null_Task, E => Null_Task_Entry)); + [others => (T => Null_Task, E => Null_Task_Entry)]; pragma Volatile_Components (User_Entry); -- Holds the task and entry index (if any) for each interrupt - Blocked : array (Interrupt_ID'Range) of Boolean := (others => False); + Blocked : array (Interrupt_ID'Range) of Boolean := [others => False]; pragma Atomic_Components (Blocked); -- True iff the corresponding interrupt is blocked in the process level - Ignored : array (Interrupt_ID'Range) of Boolean := (others => False); + Ignored : array (Interrupt_ID'Range) of Boolean := [others => False]; pragma Atomic_Components (Ignored); -- True iff the corresponding interrupt is blocked in the process level Last_Unblocker : - array (Interrupt_ID'Range) of Task_Id := (others => Null_Task); + array (Interrupt_ID'Range) of Task_Id := [others => Null_Task]; pragma Atomic_Components (Last_Unblocker); -- Holds the ID of the last Task which Unblocked this Interrupt. It -- contains Null_Task if no tasks have ever requested the Unblocking -- operation or the Interrupt is currently Blocked. Server_ID : array (Interrupt_ID'Range) of Task_Id := - (others => Null_Task); + [others => Null_Task]; pragma Atomic_Components (Server_ID); -- Holds the Task_Id of the Server_Task for each interrupt. Task_Id is -- needed to accomplish locking per Interrupt base. Also is needed to diff --git a/gcc/ada/libgnarl/s-intman.ads b/gcc/ada/libgnarl/s-intman.ads index c493163..663aed9 100644 --- a/gcc/ada/libgnarl/s-intman.ads +++ b/gcc/ada/libgnarl/s-intman.ads @@ -74,7 +74,7 @@ package System.Interrupt_Management is -- The interrupt that is used to implement task abort if an interrupt is -- used for that purpose. This is one of the reserved interrupts. - Keep_Unmasked : Interrupt_Set := (others => False); + Keep_Unmasked : Interrupt_Set := [others => False]; -- Keep_Unmasked (I) is true iff the interrupt I is one that must be kept -- unmasked at all times, except (perhaps) for short critical sections. -- This includes interrupts that are mapped to exceptions (see @@ -83,7 +83,7 @@ package System.Interrupt_Management is -- reasons. Where interrupts are implemented as OS signals, and signal -- masking is per-task, the interrupt should be unmasked in ALL TASKS. - Reserve : Interrupt_Set := (others => False); + Reserve : Interrupt_Set := [others => False]; -- Reserve (I) is true iff the interrupt I is one that cannot be permitted -- to be attached to a user handler. The possible reasons are many. For -- example, it may be mapped to an exception used to implement task abort, diff --git a/gcc/ada/libgnarl/s-intman__posix.adb b/gcc/ada/libgnarl/s-intman__posix.adb index ae3d77e..f0f65cd 100644 --- a/gcc/ada/libgnarl/s-intman__posix.adb +++ b/gcc/ada/libgnarl/s-intman__posix.adb @@ -66,7 +66,7 @@ package body System.Interrupt_Management is type Interrupt_List is array (Interrupt_ID range <>) of Interrupt_ID; Exception_Interrupts : constant Interrupt_List := - (SIGFPE, SIGILL, SIGSEGV, SIGBUS); + [SIGFPE, SIGILL, SIGSEGV, SIGBUS]; Unreserve_All_Interrupts : constant Interfaces.C.int; pragma Import @@ -206,8 +206,8 @@ package body System.Interrupt_Management is act.sa_mask := Signal_Mask; - pragma Assert (Keep_Unmasked = (Interrupt_ID'Range => False)); - pragma Assert (Reserve = (Interrupt_ID'Range => False)); + pragma Assert (Keep_Unmasked = [Interrupt_ID'Range => False]); + pragma Assert (Reserve = [Interrupt_ID'Range => False]); -- Process state of exception signals diff --git a/gcc/ada/libgnarl/s-mudido__affinity.adb b/gcc/ada/libgnarl/s-mudido__affinity.adb index 5a9ccaf..7118a1d 100644 --- a/gcc/ada/libgnarl/s-mudido__affinity.adb +++ b/gcc/ada/libgnarl/s-mudido__affinity.adb @@ -113,7 +113,7 @@ package body System.Multiprocessors.Dispatching_Domains is function Create (First : CPU; Last : CPU_Range) return Dispatching_Domain is begin - return Create ((First .. Last => True)); + return Create ([First .. Last => True]); end Create; function Create (Set : CPU_Set) return Dispatching_Domain is @@ -156,7 +156,7 @@ package body System.Multiprocessors.Dispatching_Domains is ST.System_Domain (Rng); Actual : constant ST.Dispatching_Domain := ST_DD_Slice and not System_Domain_Slice; - Expected : constant ST.Dispatching_Domain := (Rng => False); + Expected : constant ST.Dispatching_Domain := [Rng => False]; begin if Actual /= Expected then raise Dispatching_Domain_Error with @@ -184,7 +184,7 @@ package body System.Multiprocessors.Dispatching_Domains is New_System_Domain (Rng) := New_System_Domain (Rng) and not ST_DD_Slice; - if New_System_Domain = (New_System_Domain'Range => False) then + if New_System_Domain = [New_System_Domain'Range => False] then raise Dispatching_Domain_Error with "would leave System_Dispatching_Domain empty"; end if; diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads index cda0f8e..4f682e0 100644 --- a/gcc/ada/libgnarl/s-osinte__linux.ads +++ b/gcc/ada/libgnarl/s-osinte__linux.ads @@ -132,7 +132,7 @@ package System.OS_Interface is type Signal_Set is array (Natural range <>) of Signal; - Unmasked : constant Signal_Set := ( + Unmasked : constant Signal_Set := [ SIGTRAP, -- To enable debugging on multithreaded applications, mark SIGTRAP to -- be kept unmasked. @@ -148,9 +148,9 @@ package System.OS_Interface is SIGKILL, SIGSTOP -- These two signals actually can't be masked (POSIX won't allow it) - ); + ]; - Reserved : constant Signal_Set := ( + Reserved : constant Signal_Set := [ SIG32, SIG33, SIG34 -- glibc POSIX threads implementation uses two (NPTL) or three -- (LinuxThreads) real-time signals for its own use (see SIGNAL(7)). @@ -158,7 +158,7 @@ package System.OS_Interface is -- not permit these signals to be used by the public signal.h API. -- While LinuxThreads is mostly likely unused now, SIG34 is still -- reserved as this behavior is consistent with past GNAT releases. - ); + ]; type sigset_t is private; diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb index 1c8c6bd..2738934 100644 --- a/gcc/ada/libgnarl/s-taprop__linux.adb +++ b/gcc/ada/libgnarl/s-taprop__linux.adb @@ -973,8 +973,8 @@ package body System.Task_Primitives.Operations is elsif T.Common.Domain /= null and then (T.Common.Domain /= ST.System_Domain or else T.Common.Domain.all /= - (Multiprocessors.CPU'First .. - Multiprocessors.Number_Of_CPUs => True)) + [Multiprocessors.CPU'First .. + Multiprocessors.Number_Of_CPUs => True]) then declare CPUs : constant size_t := @@ -1494,8 +1494,8 @@ package body System.Task_Primitives.Operations is elsif T.Common.Domain /= null and then (T.Common.Domain /= ST.System_Domain or else T.Common.Domain.all /= - (Multiprocessors.CPU'First .. - Multiprocessors.Number_Of_CPUs => True)) + [Multiprocessors.CPU'First .. + Multiprocessors.Number_Of_CPUs => True]) then -- Set the affinity to all the processors belonging to the -- dispatching domain. To avoid changing CPU affinities when diff --git a/gcc/ada/libgnarl/s-tasdeb.adb b/gcc/ada/libgnarl/s-tasdeb.adb index d4f37f0..edb2503 100644 --- a/gcc/ada/libgnarl/s-tasdeb.adb +++ b/gcc/ada/libgnarl/s-tasdeb.adb @@ -54,7 +54,7 @@ package body System.Tasking.Debug is type Trace_Flag_Set is array (Character) of Boolean; - Trace_On : Trace_Flag_Set := ('A' .. 'Z' => False, others => True); + Trace_On : Trace_Flag_Set := ['A' .. 'Z' => False, others => True]; Stderr_Fd : constant := 2; -- File descriptor for standard error diff --git a/gcc/ada/libgnarl/s-tasdeb.ads b/gcc/ada/libgnarl/s-tasdeb.ads index eebb2a9..8d75a5e 100644 --- a/gcc/ada/libgnarl/s-tasdeb.ads +++ b/gcc/ada/libgnarl/s-tasdeb.ads @@ -65,7 +65,7 @@ package System.Tasking.Debug is -- General GDB support -- ------------------------- - Known_Tasks : array (0 .. 999) of Task_Id := (others => null) + Known_Tasks : array (0 .. 999) of Task_Id := [others => null] with Atomic_Components; -- Global array of tasks read by gdb, and updated by Create_Task and -- Finalize_TCB. Ensure access to its components is atomic to allow diff --git a/gcc/ada/libgnarl/s-tasinf__linux.ads b/gcc/ada/libgnarl/s-tasinf__linux.ads index e6da750..f2877e6 100644 --- a/gcc/ada/libgnarl/s-tasinf__linux.ads +++ b/gcc/ada/libgnarl/s-tasinf__linux.ads @@ -79,8 +79,8 @@ package System.Task_Info is subtype CPU_Set is System.OS_Interface.cpu_set_t; - Any_CPU : constant CPU_Set := (bits => (others => True)); - No_CPU : constant CPU_Set := (bits => (others => False)); + Any_CPU : constant CPU_Set := (bits => [others => True]); + No_CPU : constant CPU_Set := (bits => [others => False]); Invalid_CPU_Number : exception; -- Raised when an invalid CPU mask has been specified diff --git a/gcc/ada/libgnarl/s-taskin.adb b/gcc/ada/libgnarl/s-taskin.adb index 1e6f42d..478809c 100644 --- a/gcc/ada/libgnarl/s-taskin.adb +++ b/gcc/ada/libgnarl/s-taskin.adb @@ -140,7 +140,7 @@ package body System.Tasking is T.Common.Global_Task_Lock_Nesting := 0; T.Common.Fall_Back_Handler := null; T.Common.Specific_Handler := null; - T.Common.Debug_Events := (others => False); + T.Common.Debug_Events := [others => False]; T.Common.Task_Image_Len := 0; if T.Common.Parent = null then diff --git a/gcc/ada/libgnarl/s-taskin.ads b/gcc/ada/libgnarl/s-taskin.ads index 1751553..0073c19 100644 --- a/gcc/ada/libgnarl/s-taskin.ads +++ b/gcc/ada/libgnarl/s-taskin.ads @@ -1157,7 +1157,7 @@ package System.Tasking is -- non-terminated task so that the associated storage is automatically -- reclaimed when the task terminates. - Attributes : Attribute_Array := (others => 0); + Attributes : Attribute_Array := [others => 0]; -- Task attributes -- IMPORTANT Note: the Entry_Queues field is last for efficiency of diff --git a/gcc/ada/libgnarl/s-tasren.adb b/gcc/ada/libgnarl/s-tasren.adb index fa10b0c..7b11d39 100644 --- a/gcc/ada/libgnarl/s-tasren.adb +++ b/gcc/ada/libgnarl/s-tasren.adb @@ -59,28 +59,28 @@ package body System.Tasking.Rendezvous is ---------------- Default_Treatment : constant array (Select_Modes) of Select_Treatment := - (Simple_Mode => No_Alternative_Open, + [Simple_Mode => No_Alternative_Open, Else_Mode => Else_Selected, Terminate_Mode => Terminate_Selected, - Delay_Mode => No_Alternative_Open); + Delay_Mode => No_Alternative_Open]; New_State : constant array (Boolean, Entry_Call_State) of Entry_Call_State := - (True => - (Never_Abortable => Never_Abortable, + [True => + [Never_Abortable => Never_Abortable, Not_Yet_Abortable => Now_Abortable, Was_Abortable => Now_Abortable, Now_Abortable => Now_Abortable, Done => Done, - Cancelled => Cancelled), + Cancelled => Cancelled], False => - (Never_Abortable => Never_Abortable, + [Never_Abortable => Never_Abortable, Not_Yet_Abortable => Not_Yet_Abortable, Was_Abortable => Was_Abortable, Now_Abortable => Now_Abortable, Done => Done, - Cancelled => Cancelled) - ); + Cancelled => Cancelled] + ]; ----------------------- -- Local Subprograms -- diff --git a/gcc/ada/libgnarl/s-tassta.adb b/gcc/ada/libgnarl/s-tassta.adb index bbc7d14..245145cf 100644 --- a/gcc/ada/libgnarl/s-tassta.adb +++ b/gcc/ada/libgnarl/s-tassta.adb @@ -1462,7 +1462,7 @@ package body System.Tasking.Stages is To_Stderr (System.Address_Image (To_Address (Self_Id))); To_Stderr (" terminated by unhandled exception"); - To_Stderr ((1 => ASCII.LF)); + To_Stderr ([ASCII.LF]); To_Stderr (Exception_Information (Excep.all)); Initialization.Task_Unlock (Self_Id); end Trace_Unhandled_Exception_In_Task; diff --git a/gcc/ada/libgnarl/s-tataat.adb b/gcc/ada/libgnarl/s-tataat.adb index d3b23bb..ebc16e9 100644 --- a/gcc/ada/libgnarl/s-tataat.adb +++ b/gcc/ada/libgnarl/s-tataat.adb @@ -47,7 +47,7 @@ package body System.Tasking.Task_Attributes is end record; Index_Array : array (1 .. Max_Attribute_Count) of Index_Info := - (others => (False, False)); + [others => (False, False)]; -- Note that this package will use an efficient implementation with no -- locks and no extra dynamic memory allocation if Attribute can fit in a diff --git a/gcc/ada/libgnarl/s-tpobop.adb b/gcc/ada/libgnarl/s-tpobop.adb index 5739eaa..90e45e9 100644 --- a/gcc/ada/libgnarl/s-tpobop.adb +++ b/gcc/ada/libgnarl/s-tpobop.adb @@ -942,21 +942,21 @@ package body System.Tasking.Protected_Objects.Operations is New_State : constant array (Boolean, Entry_Call_State) of Entry_Call_State := - (True => - (Never_Abortable => Never_Abortable, + [True => + [Never_Abortable => Never_Abortable, Not_Yet_Abortable => Now_Abortable, Was_Abortable => Now_Abortable, Now_Abortable => Now_Abortable, Done => Done, - Cancelled => Cancelled), + Cancelled => Cancelled], False => - (Never_Abortable => Never_Abortable, + [Never_Abortable => Never_Abortable, Not_Yet_Abortable => Not_Yet_Abortable, Was_Abortable => Was_Abortable, Now_Abortable => Now_Abortable, Done => Done, - Cancelled => Cancelled) - ); + Cancelled => Cancelled] + ]; procedure Update_For_Queue_To_PO (Entry_Call : Entry_Call_Link; diff --git a/gcc/ada/libgnat/a-calend.adb b/gcc/ada/libgnat/a-calend.adb index b24e95d..3d7ae90 100644 --- a/gcc/ada/libgnat/a-calend.adb +++ b/gcc/ada/libgnat/a-calend.adb @@ -206,14 +206,14 @@ is Cumulative_Days_Before_Month : constant array (Month_Number) of Natural := - (0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334); + [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; -- The following table contains the hard time values of all existing leap -- seconds. The values are produced by the utility program xleaps.adb. This -- must be updated when additional leap second times are defined. Leap_Second_Times : constant array (1 .. Leap_Seconds_Count) of Time_Rep := - (-5601484800000000000, + [-5601484800000000000, -5585587199000000000, -5554051198000000000, -5522515197000000000, @@ -239,7 +239,7 @@ is -4449513577000000000, -4339180776000000000, -4244572775000000000, - -4197052774000000000); + -4197052774000000000]; --------- -- "+" -- diff --git a/gcc/ada/libgnat/a-calend.ads b/gcc/ada/libgnat/a-calend.ads index cd3fed5..caca8da 100644 --- a/gcc/ada/libgnat/a-calend.ads +++ b/gcc/ada/libgnat/a-calend.ads @@ -242,7 +242,7 @@ private -- epoch) expressed in nanoseconds. Note that year 2100 is non-leap. Days_In_Month : constant array (Month_Number) of Day_Number := - (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); + [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -- Days in month for non-leap year, leap year case is adjusted in code Invalid_Time_Zone_Offset : Long_Integer; diff --git a/gcc/ada/libgnat/a-cfinve.adb b/gcc/ada/libgnat/a-cfinve.adb index d0c7e82..4770608 100644 --- a/gcc/ada/libgnat/a-cfinve.adb +++ b/gcc/ada/libgnat/a-cfinve.adb @@ -871,7 +871,7 @@ is J := To_Array_Index (Before); - Elems (Container) (J .. J - 1 + Count) := (others => H (New_Item)); + Elems (Container) (J .. J - 1 + Count) := [others => H (New_Item)]; end Insert; procedure Insert @@ -1445,7 +1445,7 @@ is (Capacity => Length, Last => Last, Elements_Ptr => <>, - Elements => (others => H (New_Item))); + Elements => [others => H (New_Item)]); end; end To_Vector; diff --git a/gcc/ada/libgnat/a-chahan.adb b/gcc/ada/libgnat/a-chahan.adb index 411d485..387af42 100644 --- a/gcc/ada/libgnat/a-chahan.adb +++ b/gcc/ada/libgnat/a-chahan.adb @@ -64,7 +64,7 @@ is Graphic : constant Character_Flags := Alphanum or Special; Char_Map : constant array (Character) of Character_Flags := - ( + [ NUL => Control, SOH => Control, STX => Control, @@ -282,7 +282,7 @@ is LC_Y_Acute => Lower, LC_Icelandic_Thorn => Lower + Basic, LC_Y_Diaeresis => Lower - ); + ]; --------------------- -- Is_Alphanumeric -- diff --git a/gcc/ada/libgnat/a-chtgbo.adb b/gcc/ada/libgnat/a-chtgbo.adb index 678cdc0..e6db47f 100644 --- a/gcc/ada/libgnat/a-chtgbo.adb +++ b/gcc/ada/libgnat/a-chtgbo.adb @@ -60,7 +60,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Operations is -- HT.Busy := 0; -- HT.Lock := 0; HT.Free := -1; - HT.Buckets := (others => 0); -- optimize this somehow ??? + HT.Buckets := [others => 0]; -- optimize this somehow ??? end Clear; -------------------------- diff --git a/gcc/ada/libgnat/a-cobove.adb b/gcc/ada/libgnat/a-cobove.adb index e56cb94..f340f23 100644 --- a/gcc/ada/libgnat/a-cobove.adb +++ b/gcc/ada/libgnat/a-cobove.adb @@ -258,7 +258,7 @@ package body Ada.Containers.Bounded_Vectors is end if; return Vector'(Capacity => 2, - Elements => (Left, Right), + Elements => [Left, Right], Last => Index_Type'First + 1, others => <>); end "&"; @@ -1227,7 +1227,7 @@ package body Ada.Containers.Bounded_Vectors is -- The new items are being appended to the vector, so no -- sliding of existing elements is required. - EA (J .. New_Length) := (others => New_Item); + EA (J .. New_Length) := [others => New_Item]; else -- The new items are being inserted before some existing @@ -1235,7 +1235,7 @@ package body Ada.Containers.Bounded_Vectors is -- new home. EA (J + Count .. New_Length) := EA (J .. Old_Length); - EA (J .. J + Count - 1) := (others => New_Item); + EA (J .. J + Count - 1) := [others => New_Item]; end if; if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then @@ -2770,7 +2770,7 @@ package body Ada.Containers.Bounded_Vectors is end if; return V : Vector (Capacity => Length) do - V.Elements := (others => New_Item); + V.Elements := [others => New_Item]; V.Last := Last; end return; end To_Vector; diff --git a/gcc/ada/libgnat/a-cofove.adb b/gcc/ada/libgnat/a-cofove.adb index c7f4f06..4031e99 100644 --- a/gcc/ada/libgnat/a-cofove.adb +++ b/gcc/ada/libgnat/a-cofove.adb @@ -763,7 +763,7 @@ is J := To_Array_Index (Before); - Container.Elements (J .. J - 1 + Count) := (others => New_Item); + Container.Elements (J .. J - 1 + Count) := [others => New_Item]; end Insert; procedure Insert @@ -1304,7 +1304,7 @@ is return (Capacity => Length, Last => Last, - Elements => (others => New_Item)); + Elements => [others => New_Item]); end; end To_Vector; diff --git a/gcc/ada/libgnat/a-cohata.ads b/gcc/ada/libgnat/a-cohata.ads index f7e44a3..a52f542 100644 --- a/gcc/ada/libgnat/a-cohata.ads +++ b/gcc/ada/libgnat/a-cohata.ads @@ -73,7 +73,7 @@ package Ada.Containers.Hash_Tables is TC : aliased Helpers.Tamper_Counts; Free : Count_Type'Base := -1; Nodes : Nodes_Type (1 .. Capacity); - Buckets : Buckets_Type (1 .. Modulus) := (others => 0); + Buckets : Buckets_Type (1 .. Modulus) := [others => 0]; end record; package Implementation is new Helpers.Generic_Implementation; diff --git a/gcc/ada/libgnat/a-coinve.adb b/gcc/ada/libgnat/a-coinve.adb index 9df6e3d..7ed88a5 100644 --- a/gcc/ada/libgnat/a-coinve.adb +++ b/gcc/ada/libgnat/a-coinve.adb @@ -1027,7 +1027,7 @@ is SA (Index_Type'First .. Source.Last); begin TA (Index_Type'First .. J) := Src; - Src := (others => null); + Src := [others => null]; end; Source.Last := No_Index; @@ -1472,7 +1472,7 @@ is -- we started by clearing out all of the stale values, -- leaving a "hole" in the middle of the array. - E (K .. Index - 1) := (others => null); + E (K .. Index - 1) := [others => null]; raise; end; end if; @@ -2157,7 +2157,7 @@ is end if; E (Index .. New_Last) := E (Before .. Container.Last); - E (Before .. Index - 1) := (others => null); + E (Before .. Index - 1) := [others => null]; end if; end; diff --git a/gcc/ada/libgnat/a-convec.adb b/gcc/ada/libgnat/a-convec.adb index 5cede72..6f39ceb 100644 --- a/gcc/ada/libgnat/a-convec.adb +++ b/gcc/ada/libgnat/a-convec.adb @@ -1161,7 +1161,7 @@ is Container.Elements := new Elements_Type' (Last => New_Last, - EA => (others => New_Item)); + EA => [others => New_Item]); -- The allocation of the new, internal array succeeded, so it is now -- safe to update the Last index, restoring container invariants. @@ -1189,7 +1189,7 @@ is -- The new items are being appended to the vector, so no -- sliding of existing elements is required. - EA (Before .. New_Last) := (others => New_Item); + EA (Before .. New_Last) := [others => New_Item]; else -- The new items are being inserted before some existing @@ -1204,7 +1204,7 @@ is end if; EA (Index .. New_Last) := EA (Before .. Container.Last); - EA (Before .. Index - 1) := (others => New_Item); + EA (Before .. Index - 1) := [others => New_Item]; end if; end; @@ -1270,7 +1270,7 @@ is SA (Index_Type'First .. Before - 1); if Before > Container.Last then - DA (Before .. New_Last) := (others => New_Item); + DA (Before .. New_Last) := [others => New_Item]; else -- The new items are being inserted before some existing elements, @@ -1282,7 +1282,7 @@ is Index := Index_Type'Base (Count_Type'Base (Before) + Count); end if; - DA (Before .. Index - 1) := (others => New_Item); + DA (Before .. Index - 1) := [others => New_Item]; DA (Index .. New_Last) := SA (Before .. Container.Last); end if; @@ -3265,7 +3265,7 @@ is Last := Index_Type'Base (Count_Type'Base (No_Index) + Length); end if; - Elements := new Elements_Type'(Last, EA => (others => New_Item)); + Elements := new Elements_Type'(Last, EA => [others => New_Item]); return (Controlled with Elements, Last, TC => <>); end To_Vector; diff --git a/gcc/ada/libgnat/a-coprnu.ads b/gcc/ada/libgnat/a-coprnu.ads index 7f5f7bd..8a267fb 100644 --- a/gcc/ada/libgnat/a-coprnu.ads +++ b/gcc/ada/libgnat/a-coprnu.ads @@ -38,12 +38,12 @@ package Ada.Containers.Prime_Numbers is type Primes_Type is array (Positive range <>) of Hash_Type; Primes : constant Primes_Type := - (53, 97, 193, 389, 769, + [53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, 98317, 196613, 393241, 786433, 1572869, 3145739, 6291469, 12582917, 25165843, 50331653, 100663319, 201326611, 402653189, 805306457, - 1610612741, 3221225473, 4294967291); + 1610612741, 3221225473, 4294967291]; function To_Prime (Length : Count_Type) return Hash_Type; -- Returns the smallest value in Primes not less than Length diff --git a/gcc/ada/libgnat/a-direct.adb b/gcc/ada/libgnat/a-direct.adb index 20616a2..41dca3c 100644 --- a/gcc/ada/libgnat/a-direct.adb +++ b/gcc/ada/libgnat/a-direct.adb @@ -89,7 +89,7 @@ package body Ada.Directories is end record; -- The current state of a search - Empty_String : constant String := (1 .. 0 => ASCII.NUL); + Empty_String : constant String := ""; -- Empty string, returned by function Extension when there is no extension procedure Free is new Ada.Unchecked_Deallocation (Search_Data, Search_Ptr); @@ -107,7 +107,7 @@ package body Ada.Directories is (Search : in out Search_Type; Directory : String; Pattern : String; - Filter : Filter_Type := (others => True); + Filter : Filter_Type := [others => True]; Force_Case_Insensitive : Boolean); -- Similar to Start_Search except we can force a search to be -- case-insensitive, which is important for detecting the name-case @@ -1094,7 +1094,7 @@ package body Ada.Directories is (Search => S, Directory => To_String (Dir_Path), Pattern => "", - Filter => (Directory => False, others => True)); + Filter => [Directory => False, others => True]); loop Get_Next_Entry (S, Test_File); @@ -1114,7 +1114,7 @@ package body Ada.Directories is (Search => S, Directory => To_String (Dir_Path), Pattern => Simple_Name (Test_File), - Filter => (Directory => False, others => True), + Filter => [Directory => False, others => True], Force_Case_Insensitive => True); -- We will find at least one match due to the search hitting our test @@ -1215,7 +1215,7 @@ package body Ada.Directories is procedure Search (Directory : String; Pattern : String; - Filter : Filter_Type := (others => True); + Filter : Filter_Type := [others => True]; Process : not null access procedure (Directory_Entry : Directory_Entry_Type)) is @@ -1401,7 +1401,7 @@ package body Ada.Directories is (Search : in out Search_Type; Directory : String; Pattern : String; - Filter : Filter_Type := (others => True)) + Filter : Filter_Type := [others => True]) is begin Start_Search_Internal (Search, Directory, Pattern, Filter, False); @@ -1415,7 +1415,7 @@ package body Ada.Directories is (Search : in out Search_Type; Directory : String; Pattern : String; - Filter : Filter_Type := (others => True); + Filter : Filter_Type := [others => True]; Force_Case_Insensitive : Boolean) is function opendir (file_name : String) return DIRs; diff --git a/gcc/ada/libgnat/a-direct.ads b/gcc/ada/libgnat/a-direct.ads index 12f3bd4..a88cd01 100644 --- a/gcc/ada/libgnat/a-direct.ads +++ b/gcc/ada/libgnat/a-direct.ads @@ -366,7 +366,7 @@ package Ada.Directories is (Search : in out Search_Type; Directory : String; Pattern : String; - Filter : Filter_Type := (others => True)); + Filter : Filter_Type := [others => True]); -- Starts a search in the directory entry in the directory named by -- Directory for entries matching Pattern. Pattern represents a file name -- matching pattern. If Pattern is null, all items in the directory are @@ -407,7 +407,7 @@ package Ada.Directories is procedure Search (Directory : String; Pattern : String; - Filter : Filter_Type := (others => True); + Filter : Filter_Type := [others => True]; Process : not null access procedure (Directory_Entry : Directory_Entry_Type)); -- Searches in the directory named by Directory for entries matching diff --git a/gcc/ada/libgnat/a-direio.adb b/gcc/ada/libgnat/a-direio.adb index f83b34b..1258bee 100644 --- a/gcc/ada/libgnat/a-direio.adb +++ b/gcc/ada/libgnat/a-direio.adb @@ -45,7 +45,7 @@ with Ada.Unchecked_Conversion; package body Ada.Direct_IO is Zeroes : constant System.Storage_Elements.Storage_Array := - (1 .. System.Storage_Elements.Storage_Offset (Bytes) => 0); + [1 .. System.Storage_Elements.Storage_Offset (Bytes) => 0]; -- Buffer used to fill out partial records package FCB renames System.File_Control_Block; diff --git a/gcc/ada/libgnat/a-nbnbre.adb b/gcc/ada/libgnat/a-nbnbre.adb index e45bc6d..d1820f4 100644 --- a/gcc/ada/libgnat/a-nbnbre.adb +++ b/gcc/ada/libgnat/a-nbnbre.adb @@ -441,8 +441,8 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is if Str = "" then return Leading_Padding ("0", Min_Length, Char); else - return (1 .. Integer'Max (Integer (Min_Length) - Str'Length, 0) - => Char) & Str; + return [1 .. Integer'Max (Integer (Min_Length) - Str'Length, 0) + => Char] & Str; end if; end Leading_Padding; @@ -468,8 +468,8 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is return Str (Str'First .. Str'First + Length - 1); else return Str & - (1 .. Integer'Max (Integer (Length) - Str'Length, 0) - => Char); + [1 .. Integer'Max (Integer (Length) - Str'Length, 0) + => Char]; end if; end Trailing_Padding; @@ -495,7 +495,7 @@ package body Ada.Numerics.Big_Numbers.Big_Reals is if Index < 0 then return Leading_Padding ("0", Fore) & "." - & Trailing_Padding ((1 .. -Index => '0') & Str, Aft) + & Trailing_Padding ([1 .. -Index => '0'] & Str, Aft) & (if Exp = 0 then "" else "E+" & Image (Natural (Exp))); else return Leading_Padding (Str (Str'First .. Index), Fore) diff --git a/gcc/ada/libgnat/a-ngrear.adb b/gcc/ada/libgnat/a-ngrear.adb index 820e6f7..5095db8 100644 --- a/gcc/ada/libgnat/a-ngrear.adb +++ b/gcc/ada/libgnat/a-ngrear.adb @@ -614,7 +614,7 @@ package body Ada.Numerics.Generic_Real_Arrays is -- different bounds, so take care indexing elements. Assignment -- as a whole is fine as sliding is automatic in that case. - Vectors := (if not Compute_Vectors then (1 .. 0 => (1 .. 0 => 0.0)) + Vectors := (if not Compute_Vectors then [1 .. 0 => [1 .. 0 => 0.0]] else Unit_Matrix (Vectors'Length (1), Vectors'Length (2))); Values := Diagonal (M); @@ -637,7 +637,7 @@ package body Ada.Numerics.Generic_Real_Arrays is -- an absolute value that exceeds the threshold. Diag := Values; - Diag_Adj := (others => 0.0); -- Accumulates adjustments to Diag + Diag_Adj := [others => 0.0]; -- Accumulates adjustments to Diag for Row in 1 .. N - 1 loop for Col in Row + 1 .. N loop diff --git a/gcc/ada/libgnat/a-stbubo.adb b/gcc/ada/libgnat/a-stbubo.adb index a3e0e32..6e729ed 100644 --- a/gcc/ada/libgnat/a-stbubo.adb +++ b/gcc/ada/libgnat/a-stbubo.adb @@ -90,10 +90,10 @@ package body Ada.Strings.Text_Buffers.Bounded is -- If this aggregate becomes illegal due to new field, don't -- forget to add corresponding assignment statement below. Dummy : array (1 .. 0) of Buffer_Type (0) := - (others => - (Max_Characters => 0, Chars => <>, Indentation => <>, + [others => + [Max_Characters => 0, Chars => <>, Indentation => <>, Indent_Pending => <>, UTF_8_Length => <>, UTF_8_Column => <>, - All_7_Bits => <>, All_8_Bits => <>, Truncated => <>)); + All_7_Bits => <>, All_8_Bits => <>, Truncated => <>]]; begin Buffer.Indentation := Defaulted.Indentation; Buffer.Indent_Pending := Defaulted.Indent_Pending; diff --git a/gcc/ada/libgnat/a-stbufo.adb b/gcc/ada/libgnat/a-stbufo.adb index 8ac5512..7cf7a34 100644 --- a/gcc/ada/libgnat/a-stbufo.adb +++ b/gcc/ada/libgnat/a-stbufo.adb @@ -42,7 +42,7 @@ package body Ada.Strings.Text_Buffers.Formatting is X1, X2, X3, X4, X5, X6, X7, X8, X9 : Utils.UTF_8_Lines := "") is J : Positive := T'First; - Used : array (1 .. 9) of Boolean := (others => False); + Used : array (1 .. 9) of Boolean := [others => False]; begin while J <= T'Last loop if T (J) = '\' then diff --git a/gcc/ada/libgnat/a-stbuun.adb b/gcc/ada/libgnat/a-stbuun.adb index 9ae3d28..b97ec02 100644 --- a/gcc/ada/libgnat/a-stbuun.adb +++ b/gcc/ada/libgnat/a-stbuun.adb @@ -103,10 +103,10 @@ package body Ada.Strings.Text_Buffers.Unbounded is -- If this aggregate becomes illegal due to new field, don't -- forget to add corresponding assignment statement below. Dummy : array (1 .. 0) of Buffer_Type := - (others => - (Indentation => <>, Indent_Pending => <>, UTF_8_Length => <>, + [others => + [Indentation => <>, Indent_Pending => <>, UTF_8_Length => <>, UTF_8_Column => <>, All_7_Bits => <>, All_8_Bits => <>, - List => <>, Last_Used => <>)); + List => <>, Last_Used => <>]]; begin Buffer.Indentation := Defaulted.Indentation; Buffer.Indent_Pending := Defaulted.Indent_Pending; diff --git a/gcc/ada/libgnat/a-stbuut.adb b/gcc/ada/libgnat/a-stbuut.adb index b32b2d3..2d7d371 100644 --- a/gcc/ada/libgnat/a-stbuut.adb +++ b/gcc/ada/libgnat/a-stbuut.adb @@ -35,28 +35,28 @@ package body Ada.Strings.Text_Buffers.Utils is (Buffer : in out Root_Buffer_Type'Class; Item : Character_7) is begin - Put (Buffer, (1 => Item)); + Put (Buffer, [Item]); end Put_7bit; procedure Put_Character (Buffer : in out Root_Buffer_Type'Class; Item : Character) is begin - Put (Buffer, (1 => Item)); + Put (Buffer, [Item]); end Put_Character; procedure Put_Wide_Character (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Character) is begin - Wide_Put (Buffer, (1 => Item)); + Wide_Put (Buffer, [Item]); end Put_Wide_Character; procedure Put_Wide_Wide_Character (Buffer : in out Root_Buffer_Type'Class; Item : Wide_Wide_Character) is begin - Wide_Wide_Put (Buffer, (1 => Item)); + Wide_Wide_Put (Buffer, [Item]); end Put_Wide_Wide_Character; procedure Put_UTF_8_Lines diff --git a/gcc/ada/libgnat/a-stmaco.ads b/gcc/ada/libgnat/a-stmaco.ads index 4d280ec..8d2f6f7 100644 --- a/gcc/ada/libgnat/a-stmaco.ads +++ b/gcc/ada/libgnat/a-stmaco.ads @@ -64,37 +64,37 @@ private package L renames Ada.Characters.Latin_1; Control_Set : constant Character_Set := - (L.NUL .. L.US => True, + [L.NUL .. L.US => True, L.DEL .. L.APC => True, - others => False); + others => False]; Graphic_Set : constant Character_Set := - (L.Space .. L.Tilde => True, + [L.Space .. L.Tilde => True, L.No_Break_Space .. L.LC_Y_Diaeresis => True, - others => False); + others => False]; Letter_Set : constant Character_Set := - ('A' .. 'Z' => True, + ['A' .. 'Z' => True, L.LC_A .. L.LC_Z => True, L.UC_A_Grave .. L.UC_O_Diaeresis => True, L.UC_O_Oblique_Stroke .. L.LC_O_Diaeresis => True, L.LC_O_Oblique_Stroke .. L.LC_Y_Diaeresis => True, - others => False); + others => False]; Lower_Set : constant Character_Set := - (L.LC_A .. L.LC_Z => True, + [L.LC_A .. L.LC_Z => True, L.LC_German_Sharp_S .. L.LC_O_Diaeresis => True, L.LC_O_Oblique_Stroke .. L.LC_Y_Diaeresis => True, - others => False); + others => False]; Upper_Set : constant Character_Set := - ('A' .. 'Z' => True, + ['A' .. 'Z' => True, L.UC_A_Grave .. L.UC_O_Diaeresis => True, L.UC_O_Oblique_Stroke .. L.UC_Icelandic_Thorn => True, - others => False); + others => False]; Basic_Set : constant Character_Set := - ('A' .. 'Z' => True, + ['A' .. 'Z' => True, L.LC_A .. L.LC_Z => True, L.UC_AE_Diphthong .. L.UC_AE_Diphthong => True, L.LC_AE_Diphthong .. L.LC_AE_Diphthong => True, @@ -103,40 +103,40 @@ private L.LC_Icelandic_Thorn .. L.LC_Icelandic_Thorn => True, L.UC_Icelandic_Eth .. L.UC_Icelandic_Eth => True, L.LC_Icelandic_Eth .. L.LC_Icelandic_Eth => True, - others => False); + others => False]; Decimal_Digit_Set : constant Character_Set := - ('0' .. '9' => True, - others => False); + ['0' .. '9' => True, + others => False]; Hexadecimal_Digit_Set : constant Character_Set := - ('0' .. '9' => True, + ['0' .. '9' => True, 'A' .. 'F' => True, L.LC_A .. L.LC_F => True, - others => False); + others => False]; Alphanumeric_Set : constant Character_Set := - ('0' .. '9' => True, + ['0' .. '9' => True, 'A' .. 'Z' => True, L.LC_A .. L.LC_Z => True, L.UC_A_Grave .. L.UC_O_Diaeresis => True, L.UC_O_Oblique_Stroke .. L.LC_O_Diaeresis => True, L.LC_O_Oblique_Stroke .. L.LC_Y_Diaeresis => True, - others => False); + others => False]; Special_Set : constant Character_Set := - (L.Space .. L.Solidus => True, + [L.Space .. L.Solidus => True, L.Colon .. L.Commercial_At => True, L.Left_Square_Bracket .. L.Grave => True, L.Left_Curly_Bracket .. L.Tilde => True, L.No_Break_Space .. L.Inverted_Question => True, L.Multiplication_Sign .. L.Multiplication_Sign => True, L.Division_Sign .. L.Division_Sign => True, - others => False); + others => False]; ISO_646_Set : constant Character_Set := - (L.NUL .. L.DEL => True, - others => False); + [L.NUL .. L.DEL => True, + others => False]; Lower_Case_Map : constant Character_Mapping := (L.NUL & -- NUL 0 diff --git a/gcc/ada/libgnat/a-strbou.ads b/gcc/ada/libgnat/a-strbou.ads index e820184..6efdebc 100644 --- a/gcc/ada/libgnat/a-strbou.ads +++ b/gcc/ada/libgnat/a-strbou.ads @@ -2202,7 +2202,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Slice (Head'Result, 1, Length (Source)) = To_String (Source) and then Slice (Head'Result, Length (Source) + 1, Count) = - (1 .. Count - Length (Source) => Pad), + [1 .. Count - Length (Source) => Pad], Count > Max_Length and then Drop = Right => @@ -2213,13 +2213,13 @@ package Ada.Strings.Bounded with SPARK_Mode is Slice (Head'Result, 1, Length (Source)) = To_String (Source) and then Slice (Head'Result, Length (Source) + 1, Max_Length) = - (1 .. Max_Length - Length (Source) => Pad), + [1 .. Max_Length - Length (Source) => Pad], Count - Length (Source) > Max_Length and then Drop = Left => -- Source is fully dropped at the left - To_String (Head'Result) = (1 .. Max_Length => Pad), + To_String (Head'Result) = [1 .. Max_Length => Pad], others => @@ -2232,7 +2232,7 @@ package Ada.Strings.Bounded with SPARK_Mode is and then Slice (Head'Result, Max_Length - Count + Length (Source) + 1, Max_Length) = - (1 .. Count - Length (Source) => Pad)); + [1 .. Count - Length (Source) => Pad]); procedure Head (Source : in out Bounded_String; @@ -2258,7 +2258,7 @@ package Ada.Strings.Bounded with SPARK_Mode is To_String (Source'Old) and then Slice (Source, Length (Source'Old) + 1, Count) = - (1 .. Count - Length (Source'Old) => Pad), + [1 .. Count - Length (Source'Old) => Pad], Count > Max_Length and then Drop = Right => @@ -2270,13 +2270,13 @@ package Ada.Strings.Bounded with SPARK_Mode is To_String (Source'Old) and then Slice (Source, Length (Source'Old) + 1, Max_Length) = - (1 .. Max_Length - Length (Source'Old) => Pad), + [1 .. Max_Length - Length (Source'Old) => Pad], Count - Length (Source) > Max_Length and then Drop = Left => -- Source is fully dropped on the left - To_String (Source) = (1 .. Max_Length => Pad), + To_String (Source) = [1 .. Max_Length => Pad], others => @@ -2290,7 +2290,7 @@ package Ada.Strings.Bounded with SPARK_Mode is and then Slice (Source, Max_Length - Count + Length (Source'Old) + 1, Max_Length) = - (1 .. Count - Length (Source'Old) => Pad)); + [1 .. Count - Length (Source'Old) => Pad]); function Tail (Source : Bounded_String; @@ -2316,7 +2316,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Tail'Result) = Count and then Slice (Tail'Result, 1, Count - Length (Source)) = - (1 .. Count - Length (Source) => Pad) + [1 .. Count - Length (Source) => Pad] and then Slice (Tail'Result, Count - Length (Source) + 1, Count) = To_String (Source), @@ -2328,7 +2328,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Tail'Result) = Max_Length and then Slice (Tail'Result, 1, Max_Length - Length (Source)) = - (1 .. Max_Length - Length (Source) => Pad) + [1 .. Max_Length - Length (Source) => Pad] and then (if Length (Source) > 0 then Slice (Tail'Result, @@ -2339,7 +2339,7 @@ package Ada.Strings.Bounded with SPARK_Mode is => -- Source is fully dropped on the right - To_String (Tail'Result) = (1 .. Max_Length => Pad), + To_String (Tail'Result) = [1 .. Max_Length => Pad], others => @@ -2348,7 +2348,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Tail'Result) = Max_Length and then Slice (Tail'Result, 1, Count - Length (Source)) = - (1 .. Count - Length (Source) => Pad) + [1 .. Count - Length (Source) => Pad] and then Slice (Tail'Result, Count - Length (Source) + 1, Max_Length) = Slice (Source, 1, Max_Length - Count + Length (Source))); @@ -2378,7 +2378,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Source) = Count and then Slice (Source, 1, Count - Length (Source'Old)) = - (1 .. Count - Length (Source'Old) => Pad) + [1 .. Count - Length (Source'Old) => Pad] and then Slice (Source, Count - Length (Source'Old) + 1, Count) = To_String (Source'Old), @@ -2390,7 +2390,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Source) = Max_Length and then Slice (Source, 1, Max_Length - Length (Source'Old)) = - (1 .. Max_Length - Length (Source'Old) => Pad) + [1 .. Max_Length - Length (Source'Old) => Pad] and then (if Length (Source'Old) > 0 then Slice (Source, @@ -2401,7 +2401,7 @@ package Ada.Strings.Bounded with SPARK_Mode is => -- Source is fully dropped at the right - To_String (Source) = (1 .. Max_Length => Pad), + To_String (Source) = [1 .. Max_Length => Pad], others => @@ -2410,7 +2410,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Length (Source) = Max_Length and then Slice (Source, 1, Count - Length (Source'Old)) = - (1 .. Count - Length (Source'Old) => Pad) + [1 .. Count - Length (Source'Old) => Pad] and then Slice (Source, Count - Length (Source'Old) + 1, Max_Length) = Slice (Source'Old, @@ -2425,7 +2425,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Right : Character) return Bounded_String with Pre => Left <= Max_Length, - Post => To_String ("*"'Result) = (1 .. Left => Right); + Post => To_String ("*"'Result) = [1 .. Left => Right]; function "*" (Left : Natural; @@ -2461,7 +2461,7 @@ package Ada.Strings.Bounded with SPARK_Mode is Pre => (if Count > Max_Length then Drop /= Error), Post => To_String (Replicate'Result) = - (1 .. Natural'Min (Max_Length, Count) => Item); + [1 .. Natural'Min (Max_Length, Count) => Item]; function Replicate (Count : Natural; @@ -2565,7 +2565,7 @@ package Ada.Strings.Bounded with SPARK_Mode is (Max_Length => Max_Length, Current_Length => 0, Data => - (1 .. Max_Length => ASCII.NUL)); + [1 .. Max_Length => ASCII.NUL]); pragma Inline (To_Bounded_String); diff --git a/gcc/ada/libgnat/a-strfix.ads b/gcc/ada/libgnat/a-strfix.ads index 1d9fd1b..0d6c5d0 100644 --- a/gcc/ada/libgnat/a-strfix.ads +++ b/gcc/ada/libgnat/a-strfix.ads @@ -1258,7 +1258,7 @@ package Ada.Strings.Fixed with SPARK_Mode is Head'Result (1 .. Source'Length) = Source and then Head'Result (Source'Length + 1 .. Count) - = (1 .. Count - Source'Length => Pad)), + = [1 .. Count - Source'Length => Pad]), Global => null; -- Returns a string of length Count. If Count <= Source'Length, the string -- comprises the first Count characters of Source. Otherwise, its contents @@ -1315,10 +1315,10 @@ package Ada.Strings.Fixed with SPARK_Mode is -- characters. (if Source'Length = 0 - then Tail'Result = (1 .. Count => Pad) + then Tail'Result = [1 .. Count => Pad] else Tail'Result (1 .. Count - Source'Length) - = (1 .. Count - Source'Length => Pad) + = [1 .. Count - Source'Length => Pad] and then Tail'Result (Count - Source'Length + 1 .. Tail'Result'Last) = Source)), diff --git a/gcc/ada/libgnat/a-strmap.adb b/gcc/ada/libgnat/a-strmap.adb index c87f4e5..d6b05d2 100644 --- a/gcc/ada/libgnat/a-strmap.adb +++ b/gcc/ada/libgnat/a-strmap.adb @@ -135,7 +135,7 @@ is J : Natural; type Character_Index is array (Character) of Natural with Ghost; - Indexes : Character_Index := (others => 0) with Ghost; + Indexes : Character_Index := [others => 0] with Ghost; begin J := 0; @@ -367,7 +367,7 @@ is Domain : String (1 .. Map'Length) with Ghost, Relaxed_Initialization; type Character_Index is array (Character) of Natural with Ghost; - Indexes : Character_Index := (others => 0) with Ghost; + Indexes : Character_Index := [others => 0] with Ghost; -- Start of processing for To_Range diff --git a/gcc/ada/libgnat/a-strmap.ads b/gcc/ada/libgnat/a-strmap.ads index 1a15d5d..320564e 100644 --- a/gcc/ada/libgnat/a-strmap.ads +++ b/gcc/ada/libgnat/a-strmap.ads @@ -376,7 +376,7 @@ private -- the defined operations in the spec, but the operations defined -- on Character_Set_Internal remain visible. - Null_Set : constant Character_Set := (others => False); + Null_Set : constant Character_Set := [others => False]; type Character_Mapping is array (Character) of Character; diff --git a/gcc/ada/libgnat/a-strsup.adb b/gcc/ada/libgnat/a-strsup.adb index a94d6ca..b9d3669 100644 --- a/gcc/ada/libgnat/a-strsup.adb +++ b/gcc/ada/libgnat/a-strsup.adb @@ -844,7 +844,7 @@ package body Ada.Strings.Superbounded with SPARK_Mode is elsif Count <= Max_Length then Result.Data (1 .. Slen) := Source.Data (1 .. Slen); - Result.Data (Slen + 1 .. Count) := (others => Pad); + Result.Data (Slen + 1 .. Count) := [others => Pad]; Result.Current_Length := Count; else @@ -853,18 +853,18 @@ package body Ada.Strings.Superbounded with SPARK_Mode is Result.Data (1 .. Slen) := Source.Data (1 .. Slen); if Slen < Max_Length then - Result.Data (Slen + 1 .. Max_Length) := (others => Pad); + Result.Data (Slen + 1 .. Max_Length) := [others => Pad]; end if; when Strings.Left => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else Result.Data (1 .. Max_Length - Npad) := Source.Data (Count - Max_Length + 1 .. Slen); Result.Data (Max_Length - Npad + 1 .. Max_Length) := - (others => Pad); + [others => Pad]; end if; when Strings.Error => @@ -893,26 +893,26 @@ package body Ada.Strings.Superbounded with SPARK_Mode is Source.Current_Length := Count; elsif Count <= Max_Length then - Source.Data (Slen + 1 .. Count) := (others => Pad); + Source.Data (Slen + 1 .. Count) := [others => Pad]; Source.Current_Length := Count; else case Drop is when Strings.Right => if Slen < Max_Length then - Source.Data (Slen + 1 .. Max_Length) := (others => Pad); + Source.Data (Slen + 1 .. Max_Length) := [others => Pad]; end if; when Strings.Left => if Npad > Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else Temp := Source.Data; Source.Data (1 .. Max_Length - Npad) := Temp (Count - Max_Length + 1 .. Slen); Source.Data (Max_Length - Npad + 1 .. Max_Length) := - (others => Pad); + [others => Pad]; end if; when Strings.Error => @@ -1385,14 +1385,14 @@ package body Ada.Strings.Superbounded with SPARK_Mode is begin if Count <= Max_Length then - Result.Data (1 .. Count) := (others => Item); + Result.Data (1 .. Count) := [others => Item]; Result.Current_Length := Count; elsif Drop = Strings.Error then raise Ada.Strings.Length_Error; else - Result.Data (1 .. Max_Length) := (others => Item); + Result.Data (1 .. Max_Length) := [others => Item]; Result.Current_Length := Max_Length; end if; @@ -1686,7 +1686,7 @@ package body Ada.Strings.Superbounded with SPARK_Mode is end if; elsif Count <= Max_Length then - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; if Slen > 0 then Result.Data (Npad + 1 .. Count) := Source.Data (1 .. Slen); @@ -1698,16 +1698,16 @@ package body Ada.Strings.Superbounded with SPARK_Mode is case Drop is when Strings.Right => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; Result.Data (Npad + 1 .. Max_Length) := Source.Data (1 .. Max_Length - Npad); end if; when Strings.Left => - Result.Data (1 .. Max_Length - Slen) := (others => Pad); + Result.Data (1 .. Max_Length - Slen) := [others => Pad]; Result.Data (Max_Length - Slen + 1 .. Max_Length) := Source.Data (1 .. Slen); @@ -1743,7 +1743,7 @@ package body Ada.Strings.Superbounded with SPARK_Mode is end if; elsif Count <= Max_Length then - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; if Slen > 0 then Source.Data (Npad + 1 .. Count) := Temp (1 .. Slen); @@ -1755,16 +1755,16 @@ package body Ada.Strings.Superbounded with SPARK_Mode is case Drop is when Strings.Right => if Npad >= Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; Source.Data (Npad + 1 .. Max_Length) := Temp (1 .. Max_Length - Npad); end if; when Strings.Left => - Source.Data (1 .. Max_Length - Slen) := (others => Pad); + Source.Data (1 .. Max_Length - Slen) := [others => Pad]; Source.Data (Max_Length - Slen + 1 .. Max_Length) := Temp (1 .. Slen); diff --git a/gcc/ada/libgnat/a-strsup.ads b/gcc/ada/libgnat/a-strsup.ads index ae4339f..5e582c7 100644 --- a/gcc/ada/libgnat/a-strsup.ads +++ b/gcc/ada/libgnat/a-strsup.ads @@ -2322,7 +2322,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Super_Head'Result, Super_Length (Source) + 1, Count)) = - (1 .. Count - Super_Length (Source) => Pad), + [1 .. Count - Super_Length (Source) => Pad], Count > Source.Max_Length and then Drop = Right => -- Source is followed by Pad characters @@ -2334,13 +2334,13 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Super_Head'Result, Super_Length (Source) + 1, Source.Max_Length)) = - (1 .. Source.Max_Length - Super_Length (Source) => Pad), + [1 .. Source.Max_Length - Super_Length (Source) => Pad], Count - Super_Length (Source) > Source.Max_Length and then Drop = Left => -- Source is fully dropped on the left Super_To_String (Super_Head'Result) = - (1 .. Source.Max_Length => Pad), + [1 .. Source.Max_Length => Pad], others => -- Source is partly dropped on the left @@ -2355,7 +2355,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is String'(Super_Slice (Super_Head'Result, Source.Max_Length - Count + Super_Length (Source) + 1, Source.Max_Length)) = - (1 .. Count - Super_Length (Source) => Pad)), + [1 .. Count - Super_Length (Source) => Pad]), Global => null; procedure Super_Head @@ -2382,7 +2382,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Source, Super_Length (Source'Old) + 1, Count)) = - (1 .. Count - Super_Length (Source'Old) => Pad), + [1 .. Count - Super_Length (Source'Old) => Pad], Count > Source.Max_Length and then Drop = Right => -- Source is followed by Pad characters @@ -2394,12 +2394,12 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Source, Super_Length (Source'Old) + 1, Source.Max_Length)) = - (1 .. Source.Max_Length - Super_Length (Source'Old) => Pad), + [1 .. Source.Max_Length - Super_Length (Source'Old) => Pad], Count - Super_Length (Source) > Source.Max_Length and then Drop = Left => -- Source is fully dropped on the left - Super_To_String (Source) = (1 .. Source.Max_Length => Pad), + Super_To_String (Source) = [1 .. Source.Max_Length => Pad], others => -- Source is partly dropped on the left @@ -2414,7 +2414,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is String'(Super_Slice (Source, Source.Max_Length - Count + Super_Length (Source'Old) + 1, Source.Max_Length)) = - (1 .. Count - Super_Length (Source'Old) => Pad)), + [1 .. Count - Super_Length (Source'Old) => Pad]), Global => null; function Super_Tail @@ -2443,7 +2443,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Super_Tail'Result, 1, Count - Super_Length (Source))) = - (1 .. Count - Super_Length (Source) => Pad) + [1 .. Count - Super_Length (Source) => Pad] and then Super_Slice (Super_Tail'Result, Count - Super_Length (Source) + 1, Count) = @@ -2456,7 +2456,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Super_Tail'Result, 1, Source.Max_Length - Super_Length (Source))) = - (1 .. Source.Max_Length - Super_Length (Source) => Pad) + [1 .. Source.Max_Length - Super_Length (Source) => Pad] and then (if Super_Length (Source) > 0 then Super_Slice (Super_Tail'Result, @@ -2469,7 +2469,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is -- Source is fully dropped on the right Super_To_String (Super_Tail'Result) = - (1 .. Source.Max_Length => Pad), + [1 .. Source.Max_Length => Pad], others => -- Source is partly dropped on the right @@ -2478,7 +2478,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Super_Tail'Result, 1, Count - Super_Length (Source))) = - (1 .. Count - Super_Length (Source) => Pad) + [1 .. Count - Super_Length (Source) => Pad] and then String'(Super_Slice (Super_Tail'Result, Count - Super_Length (Source) + 1, Source.Max_Length)) = @@ -2512,7 +2512,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Source, 1, Count - Super_Length (Source'Old))) = - (1 .. Count - Super_Length (Source'Old) => Pad) + [1 .. Count - Super_Length (Source'Old) => Pad] and then Super_Slice (Source, Count - Super_Length (Source'Old) + 1, Count) = @@ -2525,7 +2525,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Source, 1, Source.Max_Length - Super_Length (Source'Old))) = - (1 .. Source.Max_Length - Super_Length (Source'Old) => Pad) + [1 .. Source.Max_Length - Super_Length (Source'Old) => Pad] and then (if Super_Length (Source'Old) > 0 then Super_Slice (Source, @@ -2537,7 +2537,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is => -- Source is fully dropped on the right - Super_To_String (Source) = (1 .. Source.Max_Length => Pad), + Super_To_String (Source) = [1 .. Source.Max_Length => Pad], others => -- Source is partly dropped on the right @@ -2546,7 +2546,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is and then String'(Super_Slice (Source, 1, Count - Super_Length (Source'Old))) = - (1 .. Count - Super_Length (Source'Old) => Pad) + [1 .. Count - Super_Length (Source'Old) => Pad] and then String'(Super_Slice (Source, Count - Super_Length (Source'Old) + 1, Source.Max_Length)) = @@ -2569,7 +2569,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is with Pre => Left <= Max_Length, Post => Times'Result.Max_Length = Max_Length - and then Super_To_String (Times'Result) = (1 .. Left => Right), + and then Super_To_String (Times'Result) = [1 .. Left => Right], Global => null; -- Note the additional parameter Max_Length @@ -2613,7 +2613,7 @@ package Ada.Strings.Superbounded with SPARK_Mode is Pre => (if Count > Max_Length then Drop /= Error), Post => Super_Replicate'Result.Max_Length = Max_Length and then Super_To_String (Super_Replicate'Result) = - (1 .. Natural'Min (Max_Length, Count) => Item), + [1 .. Natural'Min (Max_Length, Count) => Item], Global => null; -- Note the additional parameter Max_Length diff --git a/gcc/ada/libgnat/a-sttebu.adb b/gcc/ada/libgnat/a-sttebu.adb index bc0c6ce..f86a969 100644 --- a/gcc/ada/libgnat/a-sttebu.adb +++ b/gcc/ada/libgnat/a-sttebu.adb @@ -94,7 +94,7 @@ package body Ada.Strings.Text_Buffers is Buffer.Indent_Pending := False; if Buffer.Indentation > 0 then Put_UTF_8_Implementation - (Buffer, (1 .. Buffer.Indentation => ' ')); + (Buffer, [1 .. Buffer.Indentation => ' ']); end if; end if; @@ -111,7 +111,7 @@ package body Ada.Strings.Text_Buffers is procedure New_Line (Buffer : in out Buffer_Type) is begin Buffer.Indent_Pending := False; -- just for a moment - Put (Buffer, (1 => ASCII.LF)); + Put (Buffer, [ASCII.LF]); Buffer.Indent_Pending := True; Buffer.UTF_8_Column := 1; end New_Line; diff --git a/gcc/ada/libgnat/a-stuten.ads b/gcc/ada/libgnat/a-stuten.ads index fba30df..209c84a 100644 --- a/gcc/ada/libgnat/a-stuten.ads +++ b/gcc/ada/libgnat/a-stuten.ads @@ -94,7 +94,7 @@ package Ada.Strings.UTF_Encoding is Character'Val (16#FE#); BOM_16 : constant UTF_16_Wide_String := - (1 => Wide_Character'Val (16#FEFF#)); + [Wide_Character'Val (16#FEFF#)]; function Encoding (Item : UTF_String; diff --git a/gcc/ada/libgnat/a-stwibo.ads b/gcc/ada/libgnat/a-stwibo.ads index 9b3d0ad..1ddb83a 100644 --- a/gcc/ada/libgnat/a-stwibo.ads +++ b/gcc/ada/libgnat/a-stwibo.ads @@ -487,8 +487,8 @@ package Ada.Strings.Wide_Bounded is (Max_Length => Max_Length, Current_Length => 0, Data => - (1 .. Max_Length => - Wide_Superbounded.Wide_NUL)); + [1 .. Max_Length => + Wide_Superbounded.Wide_NUL]); pragma Inline (To_Bounded_Wide_String); diff --git a/gcc/ada/libgnat/a-stwima.ads b/gcc/ada/libgnat/a-stwima.ads index fba510a..6b5765f 100644 --- a/gcc/ada/libgnat/a-stwima.ads +++ b/gcc/ada/libgnat/a-stwima.ads @@ -181,8 +181,7 @@ private overriding procedure Adjust (Object : in out Wide_Character_Set); overriding procedure Finalize (Object : in out Wide_Character_Set); - Null_Range : aliased constant Wide_Character_Ranges := - (1 .. 0 => (Low => ' ', High => ' ')); + Null_Range : aliased constant Wide_Character_Ranges := []; Null_Set : constant Wide_Character_Set := (AF.Controlled with diff --git a/gcc/ada/libgnat/a-stwisu.adb b/gcc/ada/libgnat/a-stwisu.adb index b81be14..302bf0f 100644 --- a/gcc/ada/libgnat/a-stwisu.adb +++ b/gcc/ada/libgnat/a-stwisu.adb @@ -852,7 +852,7 @@ package body Ada.Strings.Wide_Superbounded is elsif Count <= Max_Length then Result.Current_Length := Count; Result.Data (1 .. Slen) := Source.Data (1 .. Slen); - Result.Data (Slen + 1 .. Count) := (others => Pad); + Result.Data (Slen + 1 .. Count) := [others => Pad]; else Result.Current_Length := Max_Length; @@ -860,17 +860,17 @@ package body Ada.Strings.Wide_Superbounded is case Drop is when Strings.Right => Result.Data (1 .. Slen) := Source.Data (1 .. Slen); - Result.Data (Slen + 1 .. Max_Length) := (others => Pad); + Result.Data (Slen + 1 .. Max_Length) := [others => Pad]; when Strings.Left => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else Result.Data (1 .. Max_Length - Npad) := Source.Data (Count - Max_Length + 1 .. Slen); Result.Data (Max_Length - Npad + 1 .. Max_Length) := - (others => Pad); + [others => Pad]; end if; when Strings.Error => @@ -898,18 +898,18 @@ package body Ada.Strings.Wide_Superbounded is elsif Count <= Max_Length then Source.Current_Length := Count; - Source.Data (Slen + 1 .. Count) := (others => Pad); + Source.Data (Slen + 1 .. Count) := [others => Pad]; else Source.Current_Length := Max_Length; case Drop is when Strings.Right => - Source.Data (Slen + 1 .. Max_Length) := (others => Pad); + Source.Data (Slen + 1 .. Max_Length) := [others => Pad]; when Strings.Left => if Npad > Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else Temp := Source.Data; @@ -1386,7 +1386,7 @@ package body Ada.Strings.Wide_Superbounded is Result.Current_Length := Max_Length; end if; - Result.Data (1 .. Result.Current_Length) := (others => Item); + Result.Data (1 .. Result.Current_Length) := [others => Item]; return Result; end Super_Replicate; @@ -1542,7 +1542,7 @@ package body Ada.Strings.Wide_Superbounded is elsif Count <= Max_Length then Result.Current_Length := Count; - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; Result.Data (Npad + 1 .. Count) := Source.Data (1 .. Slen); else @@ -1551,16 +1551,16 @@ package body Ada.Strings.Wide_Superbounded is case Drop is when Strings.Right => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; Result.Data (Npad + 1 .. Max_Length) := Source.Data (1 .. Max_Length - Npad); end if; when Strings.Left => - Result.Data (1 .. Max_Length - Slen) := (others => Pad); + Result.Data (1 .. Max_Length - Slen) := [others => Pad]; Result.Data (Max_Length - Slen + 1 .. Max_Length) := Source.Data (1 .. Slen); @@ -1592,7 +1592,7 @@ package body Ada.Strings.Wide_Superbounded is elsif Count <= Max_Length then Source.Current_Length := Count; - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; Source.Data (Npad + 1 .. Count) := Temp (1 .. Slen); else @@ -1601,10 +1601,10 @@ package body Ada.Strings.Wide_Superbounded is case Drop is when Strings.Right => if Npad >= Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; Source.Data (Npad + 1 .. Max_Length) := Temp (1 .. Max_Length - Npad); end if; @@ -1744,7 +1744,7 @@ package body Ada.Strings.Wide_Superbounded is end loop; end if; - Source.Data := (others => Wide_NUL); + Source.Data := [others => Wide_NUL]; Source.Current_Length := Last - First + 1; Source.Data (1 .. Source.Current_Length) := Temp (First .. Last); end Super_Trim; diff --git a/gcc/ada/libgnat/a-stzbou.ads b/gcc/ada/libgnat/a-stzbou.ads index d49d577..ae45e7c 100644 --- a/gcc/ada/libgnat/a-stzbou.ads +++ b/gcc/ada/libgnat/a-stzbou.ads @@ -493,11 +493,11 @@ package Ada.Strings.Wide_Wide_Bounded is -- the Wide_Wide_Superbounded package. Null_Bounded_Wide_Wide_String : constant Bounded_Wide_Wide_String := - (Max_Length => Max_Length, + [Max_Length => Max_Length, Current_Length => 0, Data => - (1 .. Max_Length => - Wide_Wide_Superbounded.Wide_Wide_NUL)); + [1 .. Max_Length => + Wide_Wide_Superbounded.Wide_Wide_NUL]]; pragma Inline (To_Bounded_Wide_Wide_String); diff --git a/gcc/ada/libgnat/a-stzmap.ads b/gcc/ada/libgnat/a-stzmap.ads index 14650da..86ee971 100644 --- a/gcc/ada/libgnat/a-stzmap.ads +++ b/gcc/ada/libgnat/a-stzmap.ads @@ -183,8 +183,7 @@ private procedure Adjust (Object : in out Wide_Wide_Character_Set); procedure Finalize (Object : in out Wide_Wide_Character_Set); - Null_Range : aliased constant Wide_Wide_Character_Ranges := - (1 .. 0 => (Low => ' ', High => ' ')); + Null_Range : aliased constant Wide_Wide_Character_Ranges := []; Null_Set : constant Wide_Wide_Character_Set := (AF.Controlled with diff --git a/gcc/ada/libgnat/a-stzsup.adb b/gcc/ada/libgnat/a-stzsup.adb index 92790a1..6799797 100644 --- a/gcc/ada/libgnat/a-stzsup.adb +++ b/gcc/ada/libgnat/a-stzsup.adb @@ -853,7 +853,7 @@ package body Ada.Strings.Wide_Wide_Superbounded is elsif Count <= Max_Length then Result.Current_Length := Count; Result.Data (1 .. Slen) := Source.Data (1 .. Slen); - Result.Data (Slen + 1 .. Count) := (others => Pad); + Result.Data (Slen + 1 .. Count) := [others => Pad]; else Result.Current_Length := Max_Length; @@ -861,17 +861,17 @@ package body Ada.Strings.Wide_Wide_Superbounded is case Drop is when Strings.Right => Result.Data (1 .. Slen) := Source.Data (1 .. Slen); - Result.Data (Slen + 1 .. Max_Length) := (others => Pad); + Result.Data (Slen + 1 .. Max_Length) := [others => Pad]; when Strings.Left => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else Result.Data (1 .. Max_Length - Npad) := Source.Data (Count - Max_Length + 1 .. Slen); Result.Data (Max_Length - Npad + 1 .. Max_Length) := - (others => Pad); + [others => Pad]; end if; when Strings.Error => @@ -899,18 +899,18 @@ package body Ada.Strings.Wide_Wide_Superbounded is elsif Count <= Max_Length then Source.Current_Length := Count; - Source.Data (Slen + 1 .. Count) := (others => Pad); + Source.Data (Slen + 1 .. Count) := [others => Pad]; else Source.Current_Length := Max_Length; case Drop is when Strings.Right => - Source.Data (Slen + 1 .. Max_Length) := (others => Pad); + Source.Data (Slen + 1 .. Max_Length) := [others => Pad]; when Strings.Left => if Npad > Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else Temp := Source.Data; @@ -1389,7 +1389,7 @@ package body Ada.Strings.Wide_Wide_Superbounded is Result.Current_Length := Max_Length; end if; - Result.Data (1 .. Result.Current_Length) := (others => Item); + Result.Data (1 .. Result.Current_Length) := [others => Item]; return Result; end Super_Replicate; @@ -1546,7 +1546,7 @@ package body Ada.Strings.Wide_Wide_Superbounded is elsif Count <= Max_Length then Result.Current_Length := Count; - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; Result.Data (Npad + 1 .. Count) := Source.Data (1 .. Slen); else @@ -1555,16 +1555,16 @@ package body Ada.Strings.Wide_Wide_Superbounded is case Drop is when Strings.Right => if Npad >= Max_Length then - Result.Data := (others => Pad); + Result.Data := [others => Pad]; else - Result.Data (1 .. Npad) := (others => Pad); + Result.Data (1 .. Npad) := [others => Pad]; Result.Data (Npad + 1 .. Max_Length) := Source.Data (1 .. Max_Length - Npad); end if; when Strings.Left => - Result.Data (1 .. Max_Length - Slen) := (others => Pad); + Result.Data (1 .. Max_Length - Slen) := [others => Pad]; Result.Data (Max_Length - Slen + 1 .. Max_Length) := Source.Data (1 .. Slen); @@ -1596,7 +1596,7 @@ package body Ada.Strings.Wide_Wide_Superbounded is elsif Count <= Max_Length then Source.Current_Length := Count; - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; Source.Data (Npad + 1 .. Count) := Temp (1 .. Slen); else @@ -1605,10 +1605,10 @@ package body Ada.Strings.Wide_Wide_Superbounded is case Drop is when Strings.Right => if Npad >= Max_Length then - Source.Data := (others => Pad); + Source.Data := [others => Pad]; else - Source.Data (1 .. Npad) := (others => Pad); + Source.Data (1 .. Npad) := [others => Pad]; Source.Data (Npad + 1 .. Max_Length) := Temp (1 .. Max_Length - Npad); end if; @@ -1752,7 +1752,7 @@ package body Ada.Strings.Wide_Wide_Superbounded is end loop; end if; - Source.Data := (others => Wide_Wide_NUL); + Source.Data := [others => Wide_Wide_NUL]; Source.Current_Length := Last - First + 1; Source.Data (1 .. Source.Current_Length) := Temp (First .. Last); end Super_Trim; diff --git a/gcc/ada/libgnat/a-swmwco.ads b/gcc/ada/libgnat/a-swmwco.ads index 0f92502..2e2ab44 100644 --- a/gcc/ada/libgnat/a-swmwco.ads +++ b/gcc/ada/libgnat/a-swmwco.ads @@ -66,52 +66,52 @@ private subtype WC is Wide_Character; Control_Ranges : aliased constant Wide_Character_Ranges := - ((W.NUL, W.US), - (W.DEL, W.APC)); + [ (W.NUL, W.US), + (W.DEL, W.APC)]; Control_Set : constant Wide_Character_Set := (AF.Controlled with Control_Ranges'Unrestricted_Access); Graphic_Ranges : aliased constant Wide_Character_Ranges := - ((W.Space, W.Tilde), - (WC'Val (256), WC'Last)); + [ (W.Space, W.Tilde), + (WC'Val (256), WC'Last)]; Graphic_Set : constant Wide_Character_Set := (AF.Controlled with Graphic_Ranges'Unrestricted_Access); Letter_Ranges : aliased constant Wide_Character_Ranges := - (('A', 'Z'), - (W.LC_A, W.LC_Z), - (W.UC_A_Grave, W.UC_O_Diaeresis), - (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), - (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + [ ('A', 'Z'), + (W.LC_A, W.LC_Z), + (W.UC_A_Grave, W.UC_O_Diaeresis), + (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), + (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Letter_Set : constant Wide_Character_Set := (AF.Controlled with Letter_Ranges'Unrestricted_Access); Lower_Ranges : aliased constant Wide_Character_Ranges := - (1 => (W.LC_A, W.LC_Z), + [1 => (W.LC_A, W.LC_Z), 2 => (W.LC_German_Sharp_S, W.LC_O_Diaeresis), - 3 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + 3 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Lower_Set : constant Wide_Character_Set := (AF.Controlled with Lower_Ranges'Unrestricted_Access); Upper_Ranges : aliased constant Wide_Character_Ranges := - (1 => ('A', 'Z'), + [1 => ('A', 'Z'), 2 => (W.UC_A_Grave, W.UC_O_Diaeresis), - 3 => (W.UC_O_Oblique_Stroke, W.UC_Icelandic_Thorn)); + 3 => (W.UC_O_Oblique_Stroke, W.UC_Icelandic_Thorn)]; Upper_Set : constant Wide_Character_Set := (AF.Controlled with Upper_Ranges'Unrestricted_Access); Basic_Ranges : aliased constant Wide_Character_Ranges := - (1 => ('A', 'Z'), + [1 => ('A', 'Z'), 2 => (W.LC_A, W.LC_Z), 3 => (W.UC_AE_Diphthong, W.UC_AE_Diphthong), 4 => (W.LC_AE_Diphthong, W.LC_AE_Diphthong), @@ -119,69 +119,69 @@ private 6 => (W.UC_Icelandic_Thorn, W.UC_Icelandic_Thorn), 7 => (W.LC_Icelandic_Thorn, W.LC_Icelandic_Thorn), 8 => (W.UC_Icelandic_Eth, W.UC_Icelandic_Eth), - 9 => (W.LC_Icelandic_Eth, W.LC_Icelandic_Eth)); + 9 => (W.LC_Icelandic_Eth, W.LC_Icelandic_Eth)]; Basic_Set : constant Wide_Character_Set := (AF.Controlled with Basic_Ranges'Unrestricted_Access); Decimal_Digit_Ranges : aliased constant Wide_Character_Ranges := - (1 => ('0', '9')); + [ ('0', '9')]; Decimal_Digit_Set : constant Wide_Character_Set := (AF.Controlled with Decimal_Digit_Ranges'Unrestricted_Access); Hexadecimal_Digit_Ranges : aliased constant Wide_Character_Ranges := - (1 => ('0', '9'), + [1 => ('0', '9'), 2 => ('A', 'F'), - 3 => (W.LC_A, W.LC_F)); + 3 => (W.LC_A, W.LC_F)]; Hexadecimal_Digit_Set : constant Wide_Character_Set := (AF.Controlled with Hexadecimal_Digit_Ranges'Unrestricted_Access); Alphanumeric_Ranges : aliased constant Wide_Character_Ranges := - (1 => ('0', '9'), + [1 => ('0', '9'), 2 => ('A', 'Z'), 3 => (W.LC_A, W.LC_Z), 4 => (W.UC_A_Grave, W.UC_O_Diaeresis), 5 => (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), - 6 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + 6 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Alphanumeric_Set : constant Wide_Character_Set := (AF.Controlled with Alphanumeric_Ranges'Unrestricted_Access); Special_Graphic_Ranges : aliased constant Wide_Character_Ranges := - (1 => (Wide_Space, W.Solidus), + [1 => (Wide_Space, W.Solidus), 2 => (W.Colon, W.Commercial_At), 3 => (W.Left_Square_Bracket, W.Grave), 4 => (W.Left_Curly_Bracket, W.Tilde), 5 => (W.No_Break_Space, W.Inverted_Question), 6 => (W.Multiplication_Sign, W.Multiplication_Sign), - 7 => (W.Division_Sign, W.Division_Sign)); + 7 => (W.Division_Sign, W.Division_Sign)]; Special_Graphic_Set : constant Wide_Character_Set := (AF.Controlled with Special_Graphic_Ranges'Unrestricted_Access); ISO_646_Ranges : aliased constant Wide_Character_Ranges := - (1 => (W.NUL, W.DEL)); + [ (W.NUL, W.DEL)]; ISO_646_Set : constant Wide_Character_Set := (AF.Controlled with ISO_646_Ranges'Unrestricted_Access); Character_Ranges : aliased constant Wide_Character_Ranges := - (1 => (W.NUL, WC'Val (255))); + [ (W.NUL, WC'Val (255))]; Character_Set : constant Wide_Character_Set := (AF.Controlled with Character_Ranges'Unrestricted_Access); Lower_Case_Mapping : aliased constant Wide_Character_Mapping_Values := - (Length => 56, + [Length => 56, Domain => "ABCDEFGHIJKLMNOPQRSTUVWXYZ" & @@ -247,14 +247,14 @@ private W.LC_U_Circumflex & W.LC_U_Diaeresis & W.LC_Y_Acute & - W.LC_Icelandic_Thorn); + W.LC_Icelandic_Thorn]; Lower_Case_Map : constant Wide_Character_Mapping := (AF.Controlled with Map => Lower_Case_Mapping'Unrestricted_Access); Upper_Case_Mapping : aliased constant Wide_Character_Mapping_Values := - (Length => 56, + [Length => 56, Domain => "abcdefghijklmnopqrstuvwxyz" & @@ -320,14 +320,14 @@ private W.UC_U_Circumflex & W.UC_U_Diaeresis & W.UC_Y_Acute & - W.UC_Icelandic_Thorn); + W.UC_Icelandic_Thorn]; Upper_Case_Map : constant Wide_Character_Mapping := (AF.Controlled with Upper_Case_Mapping'Unrestricted_Access); Basic_Mapping : aliased constant Wide_Character_Mapping_Values := - (Length => 55, + [Length => 55, Domain => W.UC_A_Grave & @@ -441,7 +441,7 @@ private 'u' & -- LC_U_Circumflex 'u' & -- LC_U_Diaeresis 'y' & -- LC_Y_Acute - 'y'); -- LC_Y_Diaeresis + 'y']; -- LC_Y_Diaeresis Basic_Map : constant Wide_Character_Mapping := (AF.Controlled with diff --git a/gcc/ada/libgnat/a-szmzco.ads b/gcc/ada/libgnat/a-szmzco.ads index 82f0a6b..a5b8afc 100644 --- a/gcc/ada/libgnat/a-szmzco.ads +++ b/gcc/ada/libgnat/a-szmzco.ads @@ -66,52 +66,52 @@ private subtype WC is Wide_Wide_Character; Control_Ranges : aliased constant Wide_Wide_Character_Ranges := - ((W.NUL, W.US), - (W.DEL, W.APC)); + [ (W.NUL, W.US), + (W.DEL, W.APC)]; Control_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Control_Ranges'Unrestricted_Access); Graphic_Ranges : aliased constant Wide_Wide_Character_Ranges := - ((W.Space, W.Tilde), - (WC'Val (256), WC'Last)); + [ (W.Space, W.Tilde), + (WC'Val (256), WC'Last)]; Graphic_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Graphic_Ranges'Unrestricted_Access); Letter_Ranges : aliased constant Wide_Wide_Character_Ranges := - (('A', 'Z'), - (W.LC_A, W.LC_Z), - (W.UC_A_Grave, W.UC_O_Diaeresis), - (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), - (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + [ ('A', 'Z'), + (W.LC_A, W.LC_Z), + (W.UC_A_Grave, W.UC_O_Diaeresis), + (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), + (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Letter_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Letter_Ranges'Unrestricted_Access); Lower_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => (W.LC_A, W.LC_Z), + [1 => (W.LC_A, W.LC_Z), 2 => (W.LC_German_Sharp_S, W.LC_O_Diaeresis), - 3 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + 3 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Lower_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Lower_Ranges'Unrestricted_Access); Upper_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => ('A', 'Z'), + [1 => ('A', 'Z'), 2 => (W.UC_A_Grave, W.UC_O_Diaeresis), - 3 => (W.UC_O_Oblique_Stroke, W.UC_Icelandic_Thorn)); + 3 => (W.UC_O_Oblique_Stroke, W.UC_Icelandic_Thorn)]; Upper_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Upper_Ranges'Unrestricted_Access); Basic_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => ('A', 'Z'), + [1 => ('A', 'Z'), 2 => (W.LC_A, W.LC_Z), 3 => (W.UC_AE_Diphthong, W.UC_AE_Diphthong), 4 => (W.LC_AE_Diphthong, W.LC_AE_Diphthong), @@ -119,69 +119,69 @@ private 6 => (W.UC_Icelandic_Thorn, W.UC_Icelandic_Thorn), 7 => (W.LC_Icelandic_Thorn, W.LC_Icelandic_Thorn), 8 => (W.UC_Icelandic_Eth, W.UC_Icelandic_Eth), - 9 => (W.LC_Icelandic_Eth, W.LC_Icelandic_Eth)); + 9 => (W.LC_Icelandic_Eth, W.LC_Icelandic_Eth)]; Basic_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Basic_Ranges'Unrestricted_Access); Decimal_Digit_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => ('0', '9')); + [ ('0', '9')]; Decimal_Digit_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Decimal_Digit_Ranges'Unrestricted_Access); Hexadecimal_Digit_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => ('0', '9'), + [1 => ('0', '9'), 2 => ('A', 'F'), - 3 => (W.LC_A, W.LC_F)); + 3 => (W.LC_A, W.LC_F)]; Hexadecimal_Digit_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Hexadecimal_Digit_Ranges'Unrestricted_Access); Alphanumeric_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => ('0', '9'), + [1 => ('0', '9'), 2 => ('A', 'Z'), 3 => (W.LC_A, W.LC_Z), 4 => (W.UC_A_Grave, W.UC_O_Diaeresis), 5 => (W.UC_O_Oblique_Stroke, W.LC_O_Diaeresis), - 6 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)); + 6 => (W.LC_O_Oblique_Stroke, W.LC_Y_Diaeresis)]; Alphanumeric_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Alphanumeric_Ranges'Unrestricted_Access); Special_Graphic_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => (Wide_Wide_Space, W.Solidus), + [1 => (Wide_Wide_Space, W.Solidus), 2 => (W.Colon, W.Commercial_At), 3 => (W.Left_Square_Bracket, W.Grave), 4 => (W.Left_Curly_Bracket, W.Tilde), 5 => (W.No_Break_Space, W.Inverted_Question), 6 => (W.Multiplication_Sign, W.Multiplication_Sign), - 7 => (W.Division_Sign, W.Division_Sign)); + 7 => (W.Division_Sign, W.Division_Sign)]; Special_Graphic_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Special_Graphic_Ranges'Unrestricted_Access); ISO_646_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => (W.NUL, W.DEL)); + [ (W.NUL, W.DEL)]; ISO_646_Set : constant Wide_Wide_Character_Set := (AF.Controlled with ISO_646_Ranges'Unrestricted_Access); Character_Ranges : aliased constant Wide_Wide_Character_Ranges := - (1 => (W.NUL, WC'Val (255))); + [ (W.NUL, WC'Val (255))]; Character_Set : constant Wide_Wide_Character_Set := (AF.Controlled with Character_Ranges'Unrestricted_Access); Lower_Case_Mapping : aliased constant Wide_Wide_Character_Mapping_Values := - (Length => 56, + [Length => 56, Domain => "ABCDEFGHIJKLMNOPQRSTUVWXYZ" & @@ -247,14 +247,14 @@ private W.LC_U_Circumflex & W.LC_U_Diaeresis & W.LC_Y_Acute & - W.LC_Icelandic_Thorn); + W.LC_Icelandic_Thorn]; Lower_Case_Map : constant Wide_Wide_Character_Mapping := (AF.Controlled with Map => Lower_Case_Mapping'Unrestricted_Access); Upper_Case_Mapping : aliased constant Wide_Wide_Character_Mapping_Values := - (Length => 56, + [Length => 56, Domain => "abcdefghijklmnopqrstuvwxyz" & @@ -320,14 +320,14 @@ private W.UC_U_Circumflex & W.UC_U_Diaeresis & W.UC_Y_Acute & - W.UC_Icelandic_Thorn); + W.UC_Icelandic_Thorn]; Upper_Case_Map : constant Wide_Wide_Character_Mapping := (AF.Controlled with Upper_Case_Mapping'Unrestricted_Access); Basic_Mapping : aliased constant Wide_Wide_Character_Mapping_Values := - (Length => 55, + [Length => 55, Domain => W.UC_A_Grave & @@ -441,7 +441,7 @@ private 'u' & -- LC_U_Circumflex 'u' & -- LC_U_Diaeresis 'y' & -- LC_Y_Acute - 'y'); -- LC_Y_Diaeresis + 'y']; -- LC_Y_Diaeresis Basic_Map : constant Wide_Wide_Character_Mapping := (AF.Controlled with diff --git a/gcc/ada/libgnat/a-teioed.adb b/gcc/ada/libgnat/a-teioed.adb index 6f198e5..36c73b8 100644 --- a/gcc/ada/libgnat/a-teioed.adb +++ b/gcc/ada/libgnat/a-teioed.adb @@ -279,13 +279,13 @@ package body Ada.Text_IO.Editing is or else Pic.Start_Currency < Pic.Radix_Position then Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.End_Currency - Currency_Symbol'Length + 1 .. Pic.End_Currency) := Currency_Symbol; else Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.Start_Currency .. Pic.Start_Currency + Currency_Symbol'Length - 1) := Currency_Symbol; diff --git a/gcc/ada/libgnat/a-wtedit.adb b/gcc/ada/libgnat/a-wtedit.adb index 57ed1dd..e4e7bb0 100644 --- a/gcc/ada/libgnat/a-wtedit.adb +++ b/gcc/ada/libgnat/a-wtedit.adb @@ -450,13 +450,13 @@ package body Ada.Wide_Text_IO.Editing is or else Pic.Start_Currency < Pic.Radix_Position then Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.End_Currency - Currency_Symbol'Length + 1 .. Pic.End_Currency) := Currency_Symbol; else Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.Start_Currency .. Pic.Start_Currency + Currency_Symbol'Length - 1) := Currency_Symbol; diff --git a/gcc/ada/libgnat/a-ztedit.adb b/gcc/ada/libgnat/a-ztedit.adb index b044621..41668de 100644 --- a/gcc/ada/libgnat/a-ztedit.adb +++ b/gcc/ada/libgnat/a-ztedit.adb @@ -451,13 +451,13 @@ package body Ada.Wide_Wide_Text_IO.Editing is or else Pic.Start_Currency < Pic.Radix_Position then Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.End_Currency - Currency_Symbol'Length + 1 .. Pic.End_Currency) := Currency_Symbol; else Answer (Pic.Start_Currency .. Pic.End_Currency) := - (others => ' '); + [others => ' ']; Answer (Pic.Start_Currency .. Pic.Start_Currency + Currency_Symbol'Length - 1) := Currency_Symbol; diff --git a/gcc/ada/libgnat/g-arrspl.adb b/gcc/ada/libgnat/g-arrspl.adb index 6a8518b..3c1f59a 100644 --- a/gcc/ada/libgnat/g-arrspl.adb +++ b/gcc/ada/libgnat/g-arrspl.adb @@ -181,20 +181,20 @@ package body GNAT.Array_Split is then -- Whole string, or no separator used - return (Before => Array_End, - After => Array_End); + return [Before => Array_End, + After => Array_End]; elsif Index = 1 then - return (Before => Array_End, - After => S.D.Source (S.D.Slices (Index).Stop + 1)); + return [Before => Array_End, + After => S.D.Source (S.D.Slices (Index).Stop + 1)]; elsif Index = S.D.N_Slice then - return (Before => S.D.Source (S.D.Slices (Index).Start - 1), - After => Array_End); + return [Before => S.D.Source (S.D.Slices (Index).Start - 1), + After => Array_End]; else - return (Before => S.D.Source (S.D.Slices (Index).Start - 1), - After => S.D.Source (S.D.Slices (Index).Stop + 1)); + return [Before => S.D.Source (S.D.Slices (Index).Start - 1), + After => S.D.Source (S.D.Slices (Index).Stop + 1)]; end if; end Separators; diff --git a/gcc/ada/libgnat/g-catiio.adb b/gcc/ada/libgnat/g-catiio.adb index 462e0d2..1fdf151 100644 --- a/gcc/ada/libgnat/g-catiio.adb +++ b/gcc/ada/libgnat/g-catiio.adb @@ -627,8 +627,8 @@ package body GNAT.Calendar.Time_IO is subtype String3 is String (1 .. 3); Abbrev_Upper_Month_Names : constant array (Ada.Calendar.Month_Number) of String3 := - ("JAN", "FEB", "MAR", "APR", "MAY", "JUN", - "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"); + ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", + "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"]; -- Short version of the month names, used when parsing date strings S : String := Str; diff --git a/gcc/ada/libgnat/g-cgideb.adb b/gcc/ada/libgnat/g-cgideb.adb index f127ded..2527c9b 100644 --- a/gcc/ada/libgnat/g-cgideb.adb +++ b/gcc/ada/libgnat/g-cgideb.adb @@ -167,7 +167,7 @@ package body GNAT.CGI.Debug is package body HTML_IO is - NL : constant String := (1 => ASCII.LF); + NL : constant String := [ASCII.LF]; function Bold (S : String) return String; -- Returns S as an HTML bold string @@ -270,7 +270,7 @@ package body GNAT.CGI.Debug is function Title (IO : Format; Str : String) return String is Spaces : constant Natural := (80 - Str'Length) / 2; - Indent : constant String (1 .. Spaces) := (others => ' '); + Indent : constant String (1 .. Spaces) := [others => ' ']; begin return Indent & Str & New_Line (IO); end Title; diff --git a/gcc/ada/libgnat/g-comlin.adb b/gcc/ada/libgnat/g-comlin.adb index 7f7040b..4cbfd57 100644 --- a/gcc/ada/libgnat/g-comlin.adb +++ b/gcc/ada/libgnat/g-comlin.adb @@ -1063,7 +1063,7 @@ package body GNAT.Command_Line is Parser.In_Expansion := False; Parser.Switch_Character := Switch_Char; Parser.Stop_At_First := Stop_At_First_Non_Switch; - Parser.Section := (others => 1); + Parser.Section := [others => 1]; -- If we are using sections, we have to preprocess the command line to -- delimit them. A section can be repeated, so we just give each item @@ -3225,7 +3225,7 @@ package body GNAT.Command_Line is if N /= "" then Put (" "); Put (N); - Put ((1 .. Max_Len - N'Length + 1 => ' ')); + Put ([1 .. Max_Len - N'Length + 1 => ' ']); if Config.Switches (S).Help /= null then Put (Config.Switches (S).Help.all); @@ -3243,8 +3243,8 @@ package body GNAT.Command_Line is if Config.Aliases (A).Section.all = Section then Put (" "); Put (Config.Aliases (A).Alias.all); - Put ((1 .. Max_Len - Config.Aliases (A).Alias'Length + 1 - => ' ')); + Put ([1 .. Max_Len - Config.Aliases (A).Alias'Length + 1 + => ' ']); Put ("Equivalent to " & Config.Aliases (A).Expansion.all); New_Line; end if; diff --git a/gcc/ada/libgnat/g-comlin.ads b/gcc/ada/libgnat/g-comlin.ads index e5f493e..3738432 100644 --- a/gcc/ada/libgnat/g-comlin.ads +++ b/gcc/ada/libgnat/g-comlin.ads @@ -1097,11 +1097,11 @@ private -- This type and this variable are provided to store the current switch -- and parameter. - Is_Switch : Is_Switch_Type (1 .. Arg_Count) := (others => False); + Is_Switch : Is_Switch_Type (1 .. Arg_Count) := [others => False]; -- Indicates wich arguments on the command line are considered not be -- switches or parameters to switches (leaving e.g. filenames,...) - Section : Section_Type (1 .. Arg_Count) := (others => 1); + Section : Section_Type (1 .. Arg_Count) := [others => 1]; -- Contains the number of the section associated with the current -- switch. If this number is 0, then it is a section delimiter, which is -- never returned by GetOpt. diff --git a/gcc/ada/libgnat/g-debpoo.adb b/gcc/ada/libgnat/g-debpoo.adb index 0092139..5d707ca 100644 --- a/gcc/ada/libgnat/g-debpoo.adb +++ b/gcc/ada/libgnat/g-debpoo.adb @@ -1148,7 +1148,7 @@ package body GNAT.Debug_Pools is Modulo : constant Storage_Count := Size_In_Storage_Elements mod Dead_Bytes; begin - M.all := (others => Dead); + M.all := [others => Dead]; -- Any bytes left (up to three of them) @@ -1942,7 +1942,7 @@ package body GNAT.Debug_Pools is Grand_Total : Float; Max : array (1 .. Size) of Traceback_Htable_Elem_Ptr := - (others => null); + [others => null]; -- Sorted array for the biggest memory users Allocated_In_Pool : Byte_Count; diff --git a/gcc/ada/libgnat/g-expect.adb b/gcc/ada/libgnat/g-expect.adb index b945731..89ede30 100644 --- a/gcc/ada/libgnat/g-expect.adb +++ b/gcc/ada/libgnat/g-expect.adb @@ -351,7 +351,7 @@ package body GNAT.Expect is Full_Buffer : Boolean := False) is N : Expect_Match; - Descriptors : Array_Of_Pd := (1 => Descriptor'Unrestricted_Access); + Descriptors : Array_Of_Pd := [Descriptor'Unrestricted_Access]; Try_Until : constant Time := Clock + Duration (Timeout) / 1000.0; Timeout_Tmp : Integer := Timeout; @@ -508,7 +508,7 @@ package body GNAT.Expect is Full_Buffer : Boolean := False) is N : Expect_Match; - Descriptors : Array_Of_Pd := (1 => Descriptor'Unrestricted_Access); + Descriptors : Array_Of_Pd := [Descriptor'Unrestricted_Access]; begin pragma Assert (Matched'First = 0); @@ -1078,7 +1078,7 @@ package body GNAT.Expect is function Has_Process (Regexp : Multiprocess_Regexp_Array) return Boolean is begin - return Regexp /= (Regexp'Range => (null, null)); + return Regexp /= [Regexp'Range => (null, null)]; end Has_Process; --------------- @@ -1294,8 +1294,8 @@ package body GNAT.Expect is Add_LF : Boolean := True; Empty_Buffer : Boolean := False) is - Line_Feed : aliased constant String := (1 .. 1 => ASCII.LF); - Descriptors : Array_Of_Pd := (1 => Descriptor'Unrestricted_Access); + Line_Feed : aliased constant String := [1 .. 1 => ASCII.LF]; + Descriptors : Array_Of_Pd := [Descriptor'Unrestricted_Access]; Result : Expect_Match; Discard : Natural; diff --git a/gcc/ada/libgnat/g-forstr.adb b/gcc/ada/libgnat/g-forstr.adb index 04539be..51858ed 100644 --- a/gcc/ada/libgnat/g-forstr.adb +++ b/gcc/ada/libgnat/g-forstr.adb @@ -131,7 +131,7 @@ package body GNAT.Formatted_String is return Formatted_String' (Finalization.Controlled with D => new Data'(Format'Length, 1, 1, - Null_Unbounded_String, 0, 0, (0, 0), Format)); + Null_Unbounded_String, 0, 0, [0, 0], Format)); end "+"; --------- @@ -433,7 +433,7 @@ package body GNAT.Formatted_String is declare R : String (1 .. Natural'Max (Natural'Max (F_Spec.Width, Len), - Length (Res))) := (others => ' '); + Length (Res))) := [others => ' ']; begin if F_Spec.Left_Justify then R (1 .. Length (Res)) := To_String (Res); @@ -785,7 +785,7 @@ package body GNAT.Formatted_String is elsif F.Precision > E - S + 1 then Len := F.Precision - (E - S + 1); - Buffer (S - Len .. S - 1) := (others => '0'); + Buffer (S - Len .. S - 1) := [others => '0']; S := S - Len; end if; diff --git a/gcc/ada/libgnat/g-memdum.adb b/gcc/ada/libgnat/g-memdum.adb index cd8f7ca..310923f 100644 --- a/gcc/ada/libgnat/g-memdum.adb +++ b/gcc/ada/libgnat/g-memdum.adb @@ -128,7 +128,7 @@ package body GNAT.Memory_Dump is (Count - Ctr, 16, 0, Offset_Buf, Last); Len := Last - 4; - Line_Buf (1 .. AIL - Len - 2) := (others => '0'); + Line_Buf (1 .. AIL - Len - 2) := [others => '0']; Line_Buf (AIL - Len - 1 .. AIL - 2) := Offset_Buf (4 .. Last - 1); Line_Buf (AIL - 1 .. AIL) := ": "; @@ -138,7 +138,7 @@ package body GNAT.Memory_Dump is null; end case; - Line_Buf (AIL + 1 .. Line_Buf'Last) := (others => ' '); + Line_Buf (AIL + 1 .. Line_Buf'Last) := [others => ' ']; Line_Buf (AIL + 3 * 16 + 1) := '"'; end if; diff --git a/gcc/ada/libgnat/g-rannum.adb b/gcc/ada/libgnat/g-rannum.adb index 2983201..7688781 100644 --- a/gcc/ada/libgnat/g-rannum.adb +++ b/gcc/ada/libgnat/g-rannum.adb @@ -385,7 +385,7 @@ is Result : Image_String; begin - Result := (others => ' '); + Result := [others => ' ']; Result (1 .. Sys_Max_Image_Width) := Image (Gen.Rep); if Gen.Have_Gaussian then diff --git a/gcc/ada/libgnat/g-sechas.adb b/gcc/ada/libgnat/g-sechas.adb index 178b59b..70911c0 100644 --- a/gcc/ada/libgnat/g-sechas.adb +++ b/gcc/ada/libgnat/g-sechas.adb @@ -238,7 +238,7 @@ package body GNAT.Secure_Hashes is mod FC.M_State.Block_Length; declare Pad : Stream_Element_Array (1 .. 1 + Zeroes + Size_Length) := - (1 => 128, others => 0); + [1 => 128, others => 0]; Index : Stream_Element_Offset; First_Index : Stream_Element_Offset; @@ -281,7 +281,7 @@ package body GNAT.Secure_Hashes is declare Outer_C : Context; Opad : Stream_Element_Array := - (1 .. Stream_Element_Offset (Block_Length) => 16#5c#); + [1 .. Stream_Element_Offset (Block_Length) => 16#5c#]; begin for J in C.Key'Range loop @@ -329,7 +329,7 @@ package body GNAT.Secure_Hashes is declare Ipad : Stream_Element_Array := - (1 .. Stream_Element_Offset (Block_Length) => 16#36#); + [1 .. Stream_Element_Offset (Block_Length) => 16#36#]; begin for J in C.Key'Range loop diff --git a/gcc/ada/libgnat/g-sehamd.ads b/gcc/ada/libgnat/g-sehamd.ads index 148ecb1..ca9fbfd 100644 --- a/gcc/ada/libgnat/g-sehamd.ads +++ b/gcc/ada/libgnat/g-sehamd.ads @@ -68,7 +68,7 @@ private Initial_D : constant := 16#10325476#; Initial_State : constant Hash_State.State := - (Initial_A, Initial_B, Initial_C, Initial_D); + [Initial_A, Initial_B, Initial_C, Initial_D]; -- Initialization vector from RFC 1321 end GNAT.Secure_Hashes.MD5; diff --git a/gcc/ada/libgnat/g-sehash.ads b/gcc/ada/libgnat/g-sehash.ads index 602032f..3a24088 100644 --- a/gcc/ada/libgnat/g-sehash.ads +++ b/gcc/ada/libgnat/g-sehash.ads @@ -62,11 +62,11 @@ package GNAT.Secure_Hashes.SHA1 is private Initial_State : constant Hash_State.State := - (0 => 16#67452301#, + [0 => 16#67452301#, 1 => 16#EFCDAB89#, 2 => 16#98BADCFE#, 3 => 16#10325476#, - 4 => 16#C3D2E1F0#); + 4 => 16#C3D2E1F0#]; -- Initialization vector from FIPS PUB 180-3 end GNAT.Secure_Hashes.SHA1; diff --git a/gcc/ada/libgnat/g-sercom.ads b/gcc/ada/libgnat/g-sercom.ads index 4c9b0b7..c05e00e 100644 --- a/gcc/ada/libgnat/g-sercom.ads +++ b/gcc/ada/libgnat/g-sercom.ads @@ -192,7 +192,7 @@ private end record; Data_Rate_Value : constant array (Data_Rate) of Interfaces.C.unsigned := - (B75 => 75, + [B75 => 75, B110 => 110, B150 => 150, B300 => 300, @@ -217,7 +217,7 @@ private B2500000 => 2_500_000, B3000000 => 3_000_000, B3500000 => 3_500_000, - B4000000 => 4_000_000); + B4000000 => 4_000_000]; function To_C (Port : Serial_Port) return Serial_Port_Descriptor is (Port.H); diff --git a/gcc/ada/libgnat/g-sercom__linux.adb b/gcc/ada/libgnat/g-sercom__linux.adb index dbcb171..3d62b61 100644 --- a/gcc/ada/libgnat/g-sercom__linux.adb +++ b/gcc/ada/libgnat/g-sercom__linux.adb @@ -80,7 +80,7 @@ package body GNAT.Serial_Communications is pragma Import (C, fcntl, "fcntl"); C_Data_Rate : constant array (Data_Rate) of unsigned := - (B75 => OSC.B75, + [B75 => OSC.B75, B110 => OSC.B110, B150 => OSC.B150, B300 => OSC.B300, @@ -105,18 +105,18 @@ package body GNAT.Serial_Communications is B2500000 => OSC.B2500000, B3000000 => OSC.B3000000, B3500000 => OSC.B3500000, - B4000000 => OSC.B4000000); + B4000000 => OSC.B4000000]; C_Bits : constant array (Data_Bits) of unsigned := - (CS7 => OSC.CS7, CS8 => OSC.CS8); + [CS7 => OSC.CS7, CS8 => OSC.CS8]; C_Stop_Bits : constant array (Stop_Bits_Number) of unsigned := - (One => 0, Two => OSC.CSTOPB); + [One => 0, Two => OSC.CSTOPB]; C_Parity : constant array (Parity_Check) of unsigned := - (None => 0, + [None => 0, Odd => OSC.PARENB or OSC.PARODD, - Even => OSC.PARENB); + Even => OSC.PARENB]; procedure Raise_Error (Message : String; Error : Integer := Errno); pragma No_Return (Raise_Error); diff --git a/gcc/ada/libgnat/g-shsh32.ads b/gcc/ada/libgnat/g-shsh32.ads index f23075b..de51e72 100644 --- a/gcc/ada/libgnat/g-shsh32.ads +++ b/gcc/ada/libgnat/g-shsh32.ads @@ -50,7 +50,7 @@ package GNAT.Secure_Hashes.SHA2_32 is -- SHA-224 and SHA-256 operate on 32-bit big endian words K : constant Hash_State.State (0 .. 63) := - (16#428a2f98#, 16#71374491#, 16#b5c0fbcf#, 16#e9b5dba5#, + [16#428a2f98#, 16#71374491#, 16#b5c0fbcf#, 16#e9b5dba5#, 16#3956c25b#, 16#59f111f1#, 16#923f82a4#, 16#ab1c5ed5#, 16#d807aa98#, 16#12835b01#, 16#243185be#, 16#550c7dc3#, 16#72be5d74#, 16#80deb1fe#, 16#9bdc06a7#, 16#c19bf174#, @@ -65,7 +65,7 @@ package GNAT.Secure_Hashes.SHA2_32 is 16#19a4c116#, 16#1e376c08#, 16#2748774c#, 16#34b0bcb5#, 16#391c0cb3#, 16#4ed8aa4a#, 16#5b9cca4f#, 16#682e6ff3#, 16#748f82ee#, 16#78a5636f#, 16#84c87814#, 16#8cc70208#, - 16#90befffa#, 16#a4506ceb#, 16#bef9a3f7#, 16#c67178f2#); + 16#90befffa#, 16#a4506ceb#, 16#bef9a3f7#, 16#c67178f2#]; -- Constants from FIPS PUB 180-3 function Sigma0 (X : Word) return Word; @@ -86,23 +86,23 @@ package GNAT.Secure_Hashes.SHA2_32 is S1 => S1); SHA224_Init_State : constant Hash_State.State (0 .. 7) := - (0 => 16#c1059ed8#, + [0 => 16#c1059ed8#, 1 => 16#367cd507#, 2 => 16#3070dd17#, 3 => 16#f70e5939#, 4 => 16#ffc00b31#, 5 => 16#68581511#, 6 => 16#64f98fa7#, - 7 => 16#befa4fa4#); + 7 => 16#befa4fa4#]; SHA256_Init_State : constant Hash_State.State (0 .. 7) := - (0 => 16#6a09e667#, + [0 => 16#6a09e667#, 1 => 16#bb67ae85#, 2 => 16#3c6ef372#, 3 => 16#a54ff53a#, 4 => 16#510e527f#, 5 => 16#9b05688c#, 6 => 16#1f83d9ab#, - 7 => 16#5be0cd19#); + 7 => 16#5be0cd19#]; -- Initialization vectors from FIPS PUB 180-3 end GNAT.Secure_Hashes.SHA2_32; diff --git a/gcc/ada/libgnat/g-shsh64.ads b/gcc/ada/libgnat/g-shsh64.ads index 1d67007..8440e5d 100644 --- a/gcc/ada/libgnat/g-shsh64.ads +++ b/gcc/ada/libgnat/g-shsh64.ads @@ -50,7 +50,7 @@ package GNAT.Secure_Hashes.SHA2_64 is -- SHA-384 and SHA-512 operate on 64-bit big endian words K : Hash_State.State (0 .. 79) := - (16#428a2f98d728ae22#, 16#7137449123ef65cd#, + [16#428a2f98d728ae22#, 16#7137449123ef65cd#, 16#b5c0fbcfec4d3b2f#, 16#e9b5dba58189dbbc#, 16#3956c25bf348b538#, 16#59f111f1b605d019#, 16#923f82a4af194f9b#, 16#ab1c5ed5da6d8118#, @@ -89,7 +89,7 @@ package GNAT.Secure_Hashes.SHA2_64 is 16#28db77f523047d84#, 16#32caab7b40c72493#, 16#3c9ebe0a15c9bebc#, 16#431d67c49c100d4c#, 16#4cc5d4becb3e42b6#, 16#597f299cfc657e2a#, - 16#5fcb6fab3ad6faec#, 16#6c44198c4a475817#); + 16#5fcb6fab3ad6faec#, 16#6c44198c4a475817#]; -- Constants from FIPS PUB 180-3 function Sigma0 (X : Word) return Word; @@ -110,23 +110,23 @@ package GNAT.Secure_Hashes.SHA2_64 is S1 => S1); SHA384_Init_State : constant Hash_State.State := - (0 => 16#cbbb9d5dc1059ed8#, + [0 => 16#cbbb9d5dc1059ed8#, 1 => 16#629a292a367cd507#, 2 => 16#9159015a3070dd17#, 3 => 16#152fecd8f70e5939#, 4 => 16#67332667ffc00b31#, 5 => 16#8eb44a8768581511#, 6 => 16#db0c2e0d64f98fa7#, - 7 => 16#47b5481dbefa4fa4#); + 7 => 16#47b5481dbefa4fa4#]; SHA512_Init_State : constant Hash_State.State := - (0 => 16#6a09e667f3bcc908#, + [0 => 16#6a09e667f3bcc908#, 1 => 16#bb67ae8584caa73b#, 2 => 16#3c6ef372fe94f82b#, 3 => 16#a54ff53a5f1d36f1#, 4 => 16#510e527fade682d1#, 5 => 16#9b05688c2b3e6c1f#, 6 => 16#1f83d9abfb41bd6b#, - 7 => 16#5be0cd19137e2179#); + 7 => 16#5be0cd19137e2179#]; -- Initialization vectors from FIPS PUB 180-3 end GNAT.Secure_Hashes.SHA2_64; diff --git a/gcc/ada/libgnat/g-socket.adb b/gcc/ada/libgnat/g-socket.adb index 75a2b27..c603a2d 100644 --- a/gcc/ada/libgnat/g-socket.adb +++ b/gcc/ada/libgnat/g-socket.adb @@ -71,31 +71,31 @@ package body GNAT.Sockets is -- Correspondence tables Levels : constant array (Level_Type) of C.int := - (Socket_Level => SOSC.SOL_SOCKET, + [Socket_Level => SOSC.SOL_SOCKET, IP_Protocol_For_IP_Level => SOSC.IPPROTO_IP, IP_Protocol_For_IPv6_Level => SOSC.IPPROTO_IPV6, IP_Protocol_For_UDP_Level => SOSC.IPPROTO_UDP, IP_Protocol_For_TCP_Level => SOSC.IPPROTO_TCP, IP_Protocol_For_ICMP_Level => SOSC.IPPROTO_ICMP, IP_Protocol_For_IGMP_Level => SOSC.IPPROTO_IGMP, - IP_Protocol_For_RAW_Level => SOSC.IPPROTO_RAW); + IP_Protocol_For_RAW_Level => SOSC.IPPROTO_RAW]; Modes : constant array (Mode_Type) of C.int := - (Socket_Stream => SOSC.SOCK_STREAM, + [Socket_Stream => SOSC.SOCK_STREAM, Socket_Datagram => SOSC.SOCK_DGRAM, - Socket_Raw => SOSC.SOCK_RAW); + Socket_Raw => SOSC.SOCK_RAW]; Shutmodes : constant array (Shutmode_Type) of C.int := - (Shut_Read => SOSC.SHUT_RD, + [Shut_Read => SOSC.SHUT_RD, Shut_Write => SOSC.SHUT_WR, - Shut_Read_Write => SOSC.SHUT_RDWR); + Shut_Read_Write => SOSC.SHUT_RDWR]; Requests : constant array (Request_Name) of SOSC.IOCTL_Req_T := - (Non_Blocking_IO => SOSC.FIONBIO, - N_Bytes_To_Read => SOSC.FIONREAD); + [Non_Blocking_IO => SOSC.FIONBIO, + N_Bytes_To_Read => SOSC.FIONREAD]; Options : constant array (Specific_Option_Name) of C.int := - (Keep_Alive => SOSC.SO_KEEPALIVE, + [Keep_Alive => SOSC.SO_KEEPALIVE, Keep_Alive_Count => SOSC.TCP_KEEPCNT, Keep_Alive_Idle => SOSC.TCP_KEEPIDLE, Keep_Alive_Interval => SOSC.TCP_KEEPINTVL, @@ -120,15 +120,15 @@ package body GNAT.Sockets is IPv6_Only => SOSC.IPV6_V6ONLY, Send_Timeout => SOSC.SO_SNDTIMEO, Receive_Timeout => SOSC.SO_RCVTIMEO, - Busy_Polling => SOSC.SO_BUSY_POLL); + Busy_Polling => SOSC.SO_BUSY_POLL]; -- ??? Note: for OpenSolaris, Receive_Packet_Info should be IP_RECVPKTINFO, -- but for Linux compatibility this constant is the same as IP_PKTINFO. Flags : constant array (0 .. 3) of C.int := - (0 => SOSC.MSG_OOB, -- Process_Out_Of_Band_Data + [0 => SOSC.MSG_OOB, -- Process_Out_Of_Band_Data 1 => SOSC.MSG_PEEK, -- Peek_At_Incoming_Data 2 => SOSC.MSG_WAITALL, -- Wait_For_A_Full_Reception - 3 => SOSC.MSG_EOR); -- Send_End_Of_Record + 3 => SOSC.MSG_EOR]; -- Send_End_Of_Record Socket_Error_Id : constant Exception_Id := Socket_Error'Identity; Host_Error_Id : constant Exception_Id := Host_Error'Identity; @@ -1184,8 +1184,8 @@ package body GNAT.Sockets is Numeric_Serv : Boolean := False) return Host_Service is SA : aliased Sockaddr; - H : aliased C.char_array := (1 .. SOSC.NI_MAXHOST => C.nul); - S : aliased C.char_array := (1 .. SOSC.NI_MAXSERV => C.nul); + H : aliased C.char_array := [1 .. SOSC.NI_MAXHOST => C.nul]; + S : aliased C.char_array := [1 .. SOSC.NI_MAXSERV => C.nul]; RC : C.int; Len : C.int; begin @@ -1621,7 +1621,7 @@ package body GNAT.Sockets is when Family_Inet => 4 * Value.Sin_V4'Length, when Family_Inet6 => 6 * 5 + 4 * 4); -- 1234:1234:1234:1234:1234:1234:123.123.123.123 - Dst : aliased C.char_array := (1 .. C.size_t (Size) => C.nul); + Dst : aliased C.char_array := [1 .. C.size_t (Size) => C.nul]; Ia : aliased In_Addr_Union (Value.Family); begin case Value.Family is diff --git a/gcc/ada/libgnat/g-socket.ads b/gcc/ada/libgnat/g-socket.ads index d4265a2..443b61c 100644 --- a/gcc/ada/libgnat/g-socket.ads +++ b/gcc/ada/libgnat/g-socket.ads @@ -506,7 +506,7 @@ package GNAT.Sockets is -- Octet for Internet address Inet_Addr_Bytes_Length : constant array (Family_Inet_4_6) of Natural := - (Family_Inet => 4, Family_Inet6 => 16); + [Family_Inet => 4, Family_Inet6 => 16]; type Inet_Addr_Bytes is array (Natural range <>) of Inet_Addr_Comp_Type; @@ -521,10 +521,10 @@ package GNAT.Sockets is type Inet_Addr_Type (Family : Family_Inet_4_6 := Family_Inet) is record case Family is when Family_Inet => - Sin_V4 : Inet_Addr_V4_Type := (others => 0); + Sin_V4 : Inet_Addr_V4_Type := [others => 0]; when Family_Inet6 => - Sin_V6 : Inet_Addr_V6_Type := (others => 0); + Sin_V6 : Inet_Addr_V6_Type := [others => 0]; end case; end record; @@ -571,7 +571,7 @@ package GNAT.Sockets is -- Idem for IPv6 protocol IPv4_To_IPv6_Prefix : constant Inet_Addr_Bytes := - (1 .. 10 => 0, 11 .. 12 => 255); + [1 .. 10 => 0, 11 .. 12 => 255]; -- Prefix for IPv4 mapped to IPv6 addresses -- Functions to handle masks and prefixes @@ -1529,32 +1529,32 @@ private No_Port : constant Port_Type := 0; Any_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (others => 0)); + (Family_Inet, [others => 0]); Any_Inet6_Addr : constant Inet_Addr_Type := - (Family_Inet6, (others => 0)); + (Family_Inet6, [others => 0]); No_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (others => 0)); + (Family_Inet, [others => 0]); Broadcast_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (others => 255)); + (Family_Inet, [others => 255]); Loopback_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (127, 0, 0, 1)); + (Family_Inet, [127, 0, 0, 1]); Loopback_Inet6_Addr : constant Inet_Addr_Type := (Family_Inet6, - (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)); + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); Unspecified_Group_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (224, 0, 0, 0)); + (Family_Inet, [224, 0, 0, 0]); All_Hosts_Group_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (224, 0, 0, 1)); + (Family_Inet, [224, 0, 0, 1]); All_Routers_Group_Inet_Addr : constant Inet_Addr_Type := - (Family_Inet, (224, 0, 0, 2)); + (Family_Inet, [224, 0, 0, 2]); Unspecified_Group_Inet6_Addr : constant Inet_Addr_Type := - (Family_Inet6, (255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)); + (Family_Inet6, [255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); All_Hosts_Group_Inet6_Addr : constant Inet_Addr_Type := - (Family_Inet6, (255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)); + (Family_Inet6, [255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); All_Routers_Group_Inet6_Addr : constant Inet_Addr_Type := - (Family_Inet6, (255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2)); + (Family_Inet6, [255, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2]); No_Sock_Addr : constant Sock_Addr_Type := (Family_Inet, No_Inet_Addr, 0); diff --git a/gcc/ada/libgnat/g-socpol.adb b/gcc/ada/libgnat/g-socpol.adb index 3f153af..1592594 100644 --- a/gcc/ada/libgnat/g-socpol.adb +++ b/gcc/ada/libgnat/g-socpol.adb @@ -36,7 +36,7 @@ with GNAT.Sockets.Thin; package body GNAT.Sockets.Poll is To_C : constant array (Wait_Event_Type) of Events_Type := - (Input => SOC.POLLIN or SOC.POLLPRI, Output => SOC.POLLOUT); + [Input => SOC.POLLIN or SOC.POLLPRI, Output => SOC.POLLOUT]; -- To convert Wait_Event_Type to C I/O events flags procedure Set_Mode (Item : out Pollfd; Mode : Wait_Event_Set); @@ -50,11 +50,11 @@ package body GNAT.Sockets.Poll is -- raise Constraint_Error if Index is more than number of sockets in Self function Status (Item : Pollfd) return Event_Set is - (Input => (Item.REvents and To_C (Input)) /= 0, - Output => (Item.REvents and To_C (Output)) /= 0, - Error => (Item.REvents and SOC.POLLERR) /= 0, - Hang_Up => (Item.REvents and SOC.POLLHUP) /= 0, - Invalid_Request => (Item.REvents and SOC.POLLNVAL) /= 0); + ([Input => (Item.REvents and To_C (Input)) /= 0, + Output => (Item.REvents and To_C (Output)) /= 0, + Error => (Item.REvents and SOC.POLLERR) /= 0, + Hang_Up => (Item.REvents and SOC.POLLHUP) /= 0, + Invalid_Request => (Item.REvents and SOC.POLLNVAL) /= 0]); -- Get I/O events from C word procedure Wait @@ -188,8 +188,8 @@ package body GNAT.Sockets.Poll is begin Check_Range (Self, Index); return - (Input => (Self.Fds (Index).Events and To_C (Input)) /= 0, - Output => (Self.Fds (Index).Events and To_C (Output)) /= 0); + [Input => (Self.Fds (Index).Events and To_C (Input)) /= 0, + Output => (Self.Fds (Index).Events and To_C (Output)) /= 0]; end Get_Events; ------------ diff --git a/gcc/ada/libgnat/g-socpol.ads b/gcc/ada/libgnat/g-socpol.ads index 71ce1bb..348cc6f 100644 --- a/gcc/ada/libgnat/g-socpol.ads +++ b/gcc/ada/libgnat/g-socpol.ads @@ -171,10 +171,10 @@ package GNAT.Sockets.Poll is private - Input_Event : constant Wait_Event_Set := (Input => True, Output => False); - Output_Event : constant Wait_Event_Set := (Input => False, Output => True); - Both_Events : constant Wait_Event_Set := (others => True); - Error_Event : constant Wait_Event_Set := (others => False); + Input_Event : constant Wait_Event_Set := [Input => True, Output => False]; + Output_Event : constant Wait_Event_Set := [Input => False, Output => True]; + Both_Events : constant Wait_Event_Set := [others => True]; + Error_Event : constant Wait_Event_Set := [others => False]; package SOC renames System.OS_Constants; diff --git a/gcc/ada/libgnat/g-sothco.ads b/gcc/ada/libgnat/g-sothco.ads index b48657b..761bcb1 100644 --- a/gcc/ada/libgnat/g-sothco.ads +++ b/gcc/ada/libgnat/g-sothco.ads @@ -75,16 +75,16 @@ package GNAT.Sockets.Thin_Common is ------------------------------------------- Families : constant array (Family_Type) of C.int := - (Family_Unspec => SOSC.AF_UNSPEC, + [Family_Unspec => SOSC.AF_UNSPEC, Family_Unix => SOSC.AF_UNIX, Family_Inet => SOSC.AF_INET, - Family_Inet6 => SOSC.AF_INET6); + Family_Inet6 => SOSC.AF_INET6]; Lengths : constant array (Family_Type) of C.unsigned_char := - (Family_Unspec => 0, + [Family_Unspec => 0, Family_Unix => SOSC.SIZEOF_sockaddr_un, Family_Inet => SOSC.SIZEOF_sockaddr_in, - Family_Inet6 => SOSC.SIZEOF_sockaddr_in6); + Family_Inet6 => SOSC.SIZEOF_sockaddr_in6]; ---------------------------- -- Generic socket address -- @@ -160,7 +160,7 @@ package GNAT.Sockets.Thin_Common is Sin_Addr : In_Addr := (others => 0); -- IPv4 address - Sin_Zero : C.char_array (1 .. 8) := (others => C.nul); + Sin_Zero : C.char_array (1 .. 8) := [others => C.nul]; -- Padding -- -- Note that some platforms require that all unused (reserved) bytes @@ -174,7 +174,7 @@ package GNAT.Sockets.Thin_Common is -- Port in network byte order Sin6_FlowInfo : Interfaces.Unsigned_32 := 0; - Sin6_Addr : In6_Addr := (others => 0); + Sin6_Addr : In6_Addr := [others => 0]; Sin6_Scope_Id : Interfaces.Unsigned_32 := 0; when Family_Unix => diff --git a/gcc/ada/libgnat/g-spipat.adb b/gcc/ada/libgnat/g-spipat.adb index 97cfdf9..353a92d 100644 --- a/gcc/ada/libgnat/g-spipat.adb +++ b/gcc/ada/libgnat/g-spipat.adb @@ -367,7 +367,7 @@ package body GNAT.Spitbol.Patterns is -- one character on success, and not to make any entries on the stack. OK_For_Simple_Arbno : constant array (Pattern_Code) of Boolean := - (PC_Any_CS | + [PC_Any_CS | PC_Any_CH | PC_Any_VF | PC_Any_VP | @@ -387,7 +387,7 @@ package body GNAT.Spitbol.Patterns is PC_String_4 | PC_String_5 | PC_String_6 => True, - others => False); + others => False]; ------------------------------- -- The Pattern History Stack -- diff --git a/gcc/ada/libgnat/i-cobol.ads b/gcc/ada/libgnat/i-cobol.ads index cf96e25..33fa1ae 100644 --- a/gcc/ada/libgnat/i-cobol.ads +++ b/gcc/ada/libgnat/i-cobol.ads @@ -61,7 +61,7 @@ package Interfaces.COBOL is type COBOL_Character is new Character; - Ada_To_COBOL : array (Standard.Character) of COBOL_Character := ( + Ada_To_COBOL : array (Standard.Character) of COBOL_Character := [ COBOL_Character'Val (000), COBOL_Character'Val (001), COBOL_Character'Val (002), COBOL_Character'Val (003), COBOL_Character'Val (004), COBOL_Character'Val (005), @@ -189,9 +189,9 @@ package Interfaces.COBOL is COBOL_Character'Val (248), COBOL_Character'Val (249), COBOL_Character'Val (250), COBOL_Character'Val (251), COBOL_Character'Val (252), COBOL_Character'Val (253), - COBOL_Character'Val (254), COBOL_Character'Val (255)); + COBOL_Character'Val (254), COBOL_Character'Val (255)]; - COBOL_To_Ada : array (COBOL_Character) of Standard.Character := ( + COBOL_To_Ada : array (COBOL_Character) of Standard.Character := [ Standard.Character'Val (000), Standard.Character'Val (001), Standard.Character'Val (002), Standard.Character'Val (003), Standard.Character'Val (004), Standard.Character'Val (005), @@ -319,7 +319,7 @@ package Interfaces.COBOL is Standard.Character'Val (248), Standard.Character'Val (249), Standard.Character'Val (250), Standard.Character'Val (251), Standard.Character'Val (252), Standard.Character'Val (253), - Standard.Character'Val (254), Standard.Character'Val (255)); + Standard.Character'Val (254), Standard.Character'Val (255)]; type Alphanumeric is array (Positive range <>) of COBOL_Character; -- pragma Pack (Alphanumeric); diff --git a/gcc/ada/libgnat/i-pacdec.adb b/gcc/ada/libgnat/i-pacdec.adb index 8b8acc9..4364888 100644 --- a/gcc/ada/libgnat/i-pacdec.adb +++ b/gcc/ada/libgnat/i-pacdec.adb @@ -48,7 +48,7 @@ package body Interfaces.Packed_Decimal is -- using table look up in this direction because divides are expensive. Packed_Byte : constant array (00 .. 99) of Unsigned_8 := - (16#00#, 16#01#, 16#02#, 16#03#, 16#04#, + [16#00#, 16#01#, 16#02#, 16#03#, 16#04#, 16#05#, 16#06#, 16#07#, 16#08#, 16#09#, 16#10#, 16#11#, 16#12#, 16#13#, 16#14#, 16#15#, 16#16#, 16#17#, 16#18#, 16#19#, @@ -67,7 +67,7 @@ package body Interfaces.Packed_Decimal is 16#80#, 16#81#, 16#82#, 16#83#, 16#84#, 16#85#, 16#86#, 16#87#, 16#88#, 16#89#, 16#90#, 16#91#, 16#92#, 16#93#, 16#94#, - 16#95#, 16#96#, 16#97#, 16#98#, 16#99#); + 16#95#, 16#96#, 16#97#, 16#98#, 16#99#]; --------------------- -- Int32_To_Packed -- diff --git a/gcc/ada/libgnat/i-pacdec.ads b/gcc/ada/libgnat/i-pacdec.ads index d68767f..bcfa1b7 100644 --- a/gcc/ada/libgnat/i-pacdec.ads +++ b/gcc/ada/libgnat/i-pacdec.ads @@ -91,7 +91,7 @@ package Interfaces.Packed_Decimal is -- Range of possible byte lengths Packed_Size : constant array (1 .. 18) of Byte_Length := - (01 => 01, -- Length in bytes for digits 1 + [01 => 01, -- Length in bytes for digits 1 02 => 02, -- Length in bytes for digits 2 03 => 02, -- Length in bytes for digits 2 04 => 03, -- Length in bytes for digits 2 @@ -108,7 +108,7 @@ package Interfaces.Packed_Decimal is 15 => 08, -- Length in bytes for digits 2 16 => 09, -- Length in bytes for digits 2 17 => 09, -- Length in bytes for digits 2 - 18 => 10); -- Length in bytes for digits 2 + 18 => 10]; -- Length in bytes for digits 2 ------------------------- -- Conversion Routines -- diff --git a/gcc/ada/libgnat/s-bitops.adb b/gcc/ada/libgnat/s-bitops.adb index 45290d3..0535341 100644 --- a/gcc/ada/libgnat/s-bitops.adb +++ b/gcc/ada/libgnat/s-bitops.adb @@ -59,14 +59,14 @@ package body System.Bit_Ops is -- The following is an array of masks used to mask the final byte, either -- at the high end (big-endian case) or the low end (little-endian case). - Masks : constant array (1 .. 7) of Packed_Byte := ( + Masks : constant array (1 .. 7) of Packed_Byte := [ (1 - LE) * 2#1000_0000# + LE * 2#0000_0001#, (1 - LE) * 2#1100_0000# + LE * 2#0000_0011#, (1 - LE) * 2#1110_0000# + LE * 2#0000_0111#, (1 - LE) * 2#1111_0000# + LE * 2#0000_1111#, (1 - LE) * 2#1111_1000# + LE * 2#0001_1111#, (1 - LE) * 2#1111_1100# + LE * 2#0011_1111#, - (1 - LE) * 2#1111_1110# + LE * 2#0111_1111#); + (1 - LE) * 2#1111_1110# + LE * 2#0111_1111#]; ----------------------- -- Local Subprograms -- diff --git a/gcc/ada/libgnat/s-crc32.adb b/gcc/ada/libgnat/s-crc32.adb index 9f34ed5..ea4446a 100644 --- a/gcc/ada/libgnat/s-crc32.adb +++ b/gcc/ada/libgnat/s-crc32.adb @@ -41,7 +41,7 @@ package body System.CRC32 is -- than processing the byte bit by bit. Table : constant array (CRC32 range 0 .. 255) of CRC32 := - (16#0000_0000#, 16#7707_3096#, 16#EE0E_612C#, 16#9909_51BA#, + [16#0000_0000#, 16#7707_3096#, 16#EE0E_612C#, 16#9909_51BA#, 16#076D_C419#, 16#706A_F48F#, 16#E963_A535#, 16#9E64_95A3#, 16#0EDB_8832#, 16#79DC_B8A4#, 16#E0D5_E91E#, 16#97D2_D988#, 16#09B6_4C2B#, 16#7EB1_7CBD#, 16#E7B8_2D07#, 16#90BF_1D91#, @@ -104,7 +104,7 @@ package body System.CRC32 is 16#BDBD_F21C#, 16#CABA_C28A#, 16#53B3_9330#, 16#24B4_A3A6#, 16#BAD0_3605#, 16#CDD7_0693#, 16#54DE_5729#, 16#23D9_67BF#, 16#B366_7A2E#, 16#C461_4AB8#, 16#5D68_1B02#, 16#2A6F_2B94#, - 16#B40B_BE37#, 16#C30C_8EA1#, 16#5A05_DF1B#, 16#2D02_EF8D#); + 16#B40B_BE37#, 16#C30C_8EA1#, 16#5A05_DF1B#, 16#2D02_EF8D#]; --------------- -- Get_Value -- diff --git a/gcc/ada/libgnat/s-gearop.adb b/gcc/ada/libgnat/s-gearop.adb index 957efd5..92af09d 100644 --- a/gcc/ada/libgnat/s-gearop.adb +++ b/gcc/ada/libgnat/s-gearop.adb @@ -883,7 +883,7 @@ package body System.Generic_Array_Operations is return R : Matrix (First_1 .. Check_Unit_Last (First_1, Order, First_1), First_2 .. Check_Unit_Last (First_2, Order, First_2)) do - R := (others => (others => Zero)); + R := [others => [others => Zero]]; for J in 0 .. Order - 1 loop R (First_1 + J, First_2 + J) := One; @@ -902,7 +902,7 @@ package body System.Generic_Array_Operations is is begin return R : Vector (First .. Check_Unit_Last (Index, Order, First)) do - R := (others => Zero); + R := [others => Zero]; R (Index) := One; end return; end Unit_Vector; diff --git a/gcc/ada/libgnat/s-genbig.adb b/gcc/ada/libgnat/s-genbig.adb index 8d03f0a..47d8311 100644 --- a/gcc/ada/libgnat/s-genbig.adb +++ b/gcc/ada/libgnat/s-genbig.adb @@ -50,10 +50,10 @@ package body System.Generic_Bignums is subtype LLI is Long_Long_Integer; - One_Data : constant Digit_Vector (1 .. 1) := (1 => 1); + One_Data : constant Digit_Vector (1 .. 1) := [1]; -- Constant one - Zero_Data : constant Digit_Vector (1 .. 0) := (1 .. 0 => 0); + Zero_Data : constant Digit_Vector (1 .. 0) := []; -- Constant zero ----------------------- @@ -332,7 +332,7 @@ package body System.Generic_Bignums is elsif X.Len = 1 and then X.D (1) = 2 and then Y.D (1) < 32 then declare D : constant Digit_Vector (1 .. 1) := - (1 => Shift_Left (SD'(1), Natural (Y.D (1)))); + [Shift_Left (SD'(1), Natural (Y.D (1)))]; begin return Normalize (D, X.Neg); end; @@ -573,7 +573,7 @@ package body System.Generic_Bignums is ------------- function Big_Mul (X, Y : Bignum) return Big_Integer is - Result : Digit_Vector (1 .. X.Len + Y.Len) := (others => 0); + Result : Digit_Vector (1 .. X.Len + Y.Len) := [others => 0]; -- Accumulate result (max length of result is sum of operand lengths) L : Length; @@ -1149,22 +1149,22 @@ package body System.Generic_Bignums is begin if X = 0 then - return Allocate_Big_Integer ((1 .. 0 => <>), False); + return Allocate_Big_Integer ([], False); -- One word result elsif X in -(2 ** 32 - 1) .. +(2 ** 32 - 1) then - return Allocate_Big_Integer ((1 => SD (abs X)), X < 0); + return Allocate_Big_Integer ([SD (abs X)], X < 0); -- Large negative number annoyance elsif X = -2 ** 63 then - return Allocate_Big_Integer ((2 ** 31, 0), True); + return Allocate_Big_Integer ([2 ** 31, 0], True); elsif Long_Long_Long_Integer'Size = 128 and then X = Long_Long_Long_Integer'First then - return Allocate_Big_Integer ((2 ** 31, 0, 0, 0), True); + return Allocate_Big_Integer ([2 ** 31, 0, 0, 0], True); -- Other negative numbers @@ -1196,17 +1196,17 @@ package body System.Generic_Bignums is function To_Bignum (X : Unsigned_128) return Big_Integer is begin if X = 0 then - return Allocate_Big_Integer ((1 .. 0 => <>), False); + return Allocate_Big_Integer ([], False); -- One word result elsif X < 2 ** 32 then - return Allocate_Big_Integer ((1 => SD (X)), False); + return Allocate_Big_Integer ([SD (X)], False); -- Two word result elsif Shift_Right (X, 32) < 2 ** 32 then - return Allocate_Big_Integer ((SD (X / Base), SD (X mod Base)), False); + return Allocate_Big_Integer ([SD (X / Base), SD (X mod Base)], False); -- Three or four word result @@ -1241,7 +1241,7 @@ package body System.Generic_Bignums is function To_String (X : Bignum; Width : Natural := 0; Base : Positive := 10) return String is - Big_Base : aliased Bignum_Data := (1, False, (1 => SD (Base))); + Big_Base : aliased Bignum_Data := (1, False, [SD (Base)]); function Add_Base (S : String) return String; -- Add base information if Base /= 10 @@ -1285,7 +1285,7 @@ package body System.Generic_Bignums is function Image (Arg : Bignum) return String is begin if Big_LT (Arg, Big_Base'Unchecked_Access) then - return (1 => Hex_Chars (Natural (From_Bignum (Arg)))); + return [Hex_Chars (Natural (From_Bignum (Arg)))]; else declare Div : aliased Big_Integer; @@ -1315,8 +1315,8 @@ package body System.Generic_Bignums is Min_Length : Natural; Char : Character := ' ') return String is begin - return (1 .. Integer'Max (Integer (Min_Length) - Str'Length, 0) - => Char) & Str; + return [1 .. Integer'Max (Integer (Min_Length) - Str'Length, 0) + => Char] & Str; end Leading_Padding; Zero : aliased Bignum_Data := (0, False, D => Zero_Data); diff --git a/gcc/ada/libgnat/s-htable.adb b/gcc/ada/libgnat/s-htable.adb index af2db2f..90bfc13 100644 --- a/gcc/ada/libgnat/s-htable.adb +++ b/gcc/ada/libgnat/s-htable.adb @@ -173,7 +173,7 @@ package body System.HTable is begin -- Use an aggregate for efficiency reasons - Table := (others => Null_Ptr); + Table := [others => Null_Ptr]; end Reset; --------- diff --git a/gcc/ada/libgnat/s-imgcha.adb b/gcc/ada/libgnat/s-imgcha.adb index bfcae49..8c58b19 100644 --- a/gcc/ada/libgnat/s-imgcha.adb +++ b/gcc/ada/libgnat/s-imgcha.adb @@ -48,7 +48,7 @@ package body System.Img_Char is range Character'Val (16#00#) .. Character'Val (16#1F#); C0 : constant array (C0_Range) of Cname := - (Character'Val (16#00#) => "NUL", + [Character'Val (16#00#) => "NUL", Character'Val (16#01#) => "SOH", Character'Val (16#02#) => "STX", Character'Val (16#03#) => "ETX", @@ -79,13 +79,13 @@ package body System.Img_Char is Character'Val (16#1C#) => "FS ", Character'Val (16#1D#) => "GS ", Character'Val (16#1E#) => "RS ", - Character'Val (16#1F#) => "US "); + Character'Val (16#1F#) => "US "]; subtype C1_Range is Character range Character'Val (16#7F#) .. Character'Val (16#9F#); C1 : constant array (C1_Range) of Cname := - (Character'Val (16#7F#) => "DEL", + [Character'Val (16#7F#) => "DEL", Character'Val (16#80#) => "res", Character'Val (16#81#) => "res", Character'Val (16#82#) => "BPH", @@ -117,7 +117,7 @@ package body System.Img_Char is Character'Val (16#9C#) => "ST ", Character'Val (16#9D#) => "OSC", Character'Val (16#9E#) => "PM ", - Character'Val (16#9F#) => "APC"); + Character'Val (16#9F#) => "APC"]; begin -- Control characters are represented by their names (RM 3.5(32)) diff --git a/gcc/ada/libgnat/s-powflt.ads b/gcc/ada/libgnat/s-powflt.ads index 0967403..4dc490c 100644 --- a/gcc/ada/libgnat/s-powflt.ads +++ b/gcc/ada/libgnat/s-powflt.ads @@ -42,26 +42,26 @@ package System.Powten_Flt is -- Largest power of ten exactly representable with a double Float Powten : constant array (0 .. Maxpow, 1 .. 2) of Float := - (00 => (1.0E+00, 0.0), - 01 => (1.0E+01, 0.0), - 02 => (1.0E+02, 0.0), - 03 => (1.0E+03, 0.0), - 04 => (1.0E+04, 0.0), - 05 => (1.0E+05, 0.0), - 06 => (1.0E+06, 0.0), - 07 => (1.0E+07, 0.0), - 08 => (1.0E+08, 0.0), - 09 => (1.0E+09, 0.0), - 10 => (1.0E+10, 0.0), - 11 => (1.0E+11, 1.0E+11 - Float'Machine (1.0E+11)), - 12 => (1.0E+12, 1.0E+12 - Float'Machine (1.0E+12)), - 13 => (1.0E+13, 1.0E+13 - Float'Machine (1.0E+13)), - 14 => (1.0E+14, 1.0E+14 - Float'Machine (1.0E+14)), - 15 => (1.0E+15, 1.0E+15 - Float'Machine (1.0E+15)), - 16 => (1.0E+16, 1.0E+16 - Float'Machine (1.0E+16)), - 17 => (1.0E+17, 1.0E+17 - Float'Machine (1.0E+17)), - 18 => (1.0E+18, 1.0E+18 - Float'Machine (1.0E+18)), - 19 => (1.0E+19, 1.0E+19 - Float'Machine (1.0E+19)), - 20 => (1.0E+20, 1.0E+20 - Float'Machine (1.0E+20))); + [00 => [1.0E+00, 0.0], + 01 => [1.0E+01, 0.0], + 02 => [1.0E+02, 0.0], + 03 => [1.0E+03, 0.0], + 04 => [1.0E+04, 0.0], + 05 => [1.0E+05, 0.0], + 06 => [1.0E+06, 0.0], + 07 => [1.0E+07, 0.0], + 08 => [1.0E+08, 0.0], + 09 => [1.0E+09, 0.0], + 10 => [1.0E+10, 0.0], + 11 => [1.0E+11, 1.0E+11 - Float'Machine (1.0E+11)], + 12 => [1.0E+12, 1.0E+12 - Float'Machine (1.0E+12)], + 13 => [1.0E+13, 1.0E+13 - Float'Machine (1.0E+13)], + 14 => [1.0E+14, 1.0E+14 - Float'Machine (1.0E+14)], + 15 => [1.0E+15, 1.0E+15 - Float'Machine (1.0E+15)], + 16 => [1.0E+16, 1.0E+16 - Float'Machine (1.0E+16)], + 17 => [1.0E+17, 1.0E+17 - Float'Machine (1.0E+17)], + 18 => [1.0E+18, 1.0E+18 - Float'Machine (1.0E+18)], + 19 => [1.0E+19, 1.0E+19 - Float'Machine (1.0E+19)], + 20 => [1.0E+20, 1.0E+20 - Float'Machine (1.0E+20)]]; end System.Powten_Flt; diff --git a/gcc/ada/libgnat/s-powlfl.ads b/gcc/ada/libgnat/s-powlfl.ads index 7800f2f..0ae36ec 100644 --- a/gcc/ada/libgnat/s-powlfl.ads +++ b/gcc/ada/libgnat/s-powlfl.ads @@ -42,50 +42,50 @@ package System.Powten_LFlt is -- Largest power of ten exactly representable with a double Long_Float Powten : constant array (0 .. Maxpow, 1 .. 2) of Long_Float := - (00 => (1.0E+00, 0.0), - 01 => (1.0E+01, 0.0), - 02 => (1.0E+02, 0.0), - 03 => (1.0E+03, 0.0), - 04 => (1.0E+04, 0.0), - 05 => (1.0E+05, 0.0), - 06 => (1.0E+06, 0.0), - 07 => (1.0E+07, 0.0), - 08 => (1.0E+08, 0.0), - 09 => (1.0E+09, 0.0), - 10 => (1.0E+10, 0.0), - 11 => (1.0E+11, 0.0), - 12 => (1.0E+12, 0.0), - 13 => (1.0E+13, 0.0), - 14 => (1.0E+14, 0.0), - 15 => (1.0E+15, 0.0), - 16 => (1.0E+16, 0.0), - 17 => (1.0E+17, 0.0), - 18 => (1.0E+18, 0.0), - 19 => (1.0E+19, 0.0), - 20 => (1.0E+20, 0.0), - 21 => (1.0E+21, 0.0), - 22 => (1.0E+22, 0.0), - 23 => (1.0E+23, 1.0E+23 - Long_Float'Machine (1.0E+23)), - 24 => (1.0E+24, 1.0E+24 - Long_Float'Machine (1.0E+24)), - 25 => (1.0E+25, 1.0E+25 - Long_Float'Machine (1.0E+25)), - 26 => (1.0E+26, 1.0E+26 - Long_Float'Machine (1.0E+26)), - 27 => (1.0E+27, 1.0E+27 - Long_Float'Machine (1.0E+27)), - 28 => (1.0E+28, 1.0E+28 - Long_Float'Machine (1.0E+28)), - 29 => (1.0E+29, 1.0E+29 - Long_Float'Machine (1.0E+29)), - 30 => (1.0E+30, 1.0E+30 - Long_Float'Machine (1.0E+30)), - 31 => (1.0E+31, 1.0E+31 - Long_Float'Machine (1.0E+31)), - 32 => (1.0E+32, 1.0E+32 - Long_Float'Machine (1.0E+32)), - 33 => (1.0E+33, 1.0E+33 - Long_Float'Machine (1.0E+33)), - 34 => (1.0E+34, 1.0E+34 - Long_Float'Machine (1.0E+34)), - 35 => (1.0E+35, 1.0E+35 - Long_Float'Machine (1.0E+35)), - 36 => (1.0E+36, 1.0E+36 - Long_Float'Machine (1.0E+36)), - 37 => (1.0E+37, 1.0E+37 - Long_Float'Machine (1.0E+37)), - 38 => (1.0E+38, 1.0E+38 - Long_Float'Machine (1.0E+38)), - 39 => (1.0E+39, 1.0E+39 - Long_Float'Machine (1.0E+39)), - 40 => (1.0E+40, 1.0E+40 - Long_Float'Machine (1.0E+40)), - 41 => (1.0E+41, 1.0E+41 - Long_Float'Machine (1.0E+41)), - 42 => (1.0E+42, 1.0E+42 - Long_Float'Machine (1.0E+42)), - 43 => (1.0E+43, 1.0E+43 - Long_Float'Machine (1.0E+43)), - 44 => (1.0E+44, 1.0E+44 - Long_Float'Machine (1.0E+44))); + [00 => [1.0E+00, 0.0], + 01 => [1.0E+01, 0.0], + 02 => [1.0E+02, 0.0], + 03 => [1.0E+03, 0.0], + 04 => [1.0E+04, 0.0], + 05 => [1.0E+05, 0.0], + 06 => [1.0E+06, 0.0], + 07 => [1.0E+07, 0.0], + 08 => [1.0E+08, 0.0], + 09 => [1.0E+09, 0.0], + 10 => [1.0E+10, 0.0], + 11 => [1.0E+11, 0.0], + 12 => [1.0E+12, 0.0], + 13 => [1.0E+13, 0.0], + 14 => [1.0E+14, 0.0], + 15 => [1.0E+15, 0.0], + 16 => [1.0E+16, 0.0], + 17 => [1.0E+17, 0.0], + 18 => [1.0E+18, 0.0], + 19 => [1.0E+19, 0.0], + 20 => [1.0E+20, 0.0], + 21 => [1.0E+21, 0.0], + 22 => [1.0E+22, 0.0], + 23 => [1.0E+23, 1.0E+23 - Long_Float'Machine (1.0E+23)], + 24 => [1.0E+24, 1.0E+24 - Long_Float'Machine (1.0E+24)], + 25 => [1.0E+25, 1.0E+25 - Long_Float'Machine (1.0E+25)], + 26 => [1.0E+26, 1.0E+26 - Long_Float'Machine (1.0E+26)], + 27 => [1.0E+27, 1.0E+27 - Long_Float'Machine (1.0E+27)], + 28 => [1.0E+28, 1.0E+28 - Long_Float'Machine (1.0E+28)], + 29 => [1.0E+29, 1.0E+29 - Long_Float'Machine (1.0E+29)], + 30 => [1.0E+30, 1.0E+30 - Long_Float'Machine (1.0E+30)], + 31 => [1.0E+31, 1.0E+31 - Long_Float'Machine (1.0E+31)], + 32 => [1.0E+32, 1.0E+32 - Long_Float'Machine (1.0E+32)], + 33 => [1.0E+33, 1.0E+33 - Long_Float'Machine (1.0E+33)], + 34 => [1.0E+34, 1.0E+34 - Long_Float'Machine (1.0E+34)], + 35 => [1.0E+35, 1.0E+35 - Long_Float'Machine (1.0E+35)], + 36 => [1.0E+36, 1.0E+36 - Long_Float'Machine (1.0E+36)], + 37 => [1.0E+37, 1.0E+37 - Long_Float'Machine (1.0E+37)], + 38 => [1.0E+38, 1.0E+38 - Long_Float'Machine (1.0E+38)], + 39 => [1.0E+39, 1.0E+39 - Long_Float'Machine (1.0E+39)], + 40 => [1.0E+40, 1.0E+40 - Long_Float'Machine (1.0E+40)], + 41 => [1.0E+41, 1.0E+41 - Long_Float'Machine (1.0E+41)], + 42 => [1.0E+42, 1.0E+42 - Long_Float'Machine (1.0E+42)], + 43 => [1.0E+43, 1.0E+43 - Long_Float'Machine (1.0E+43)], + 44 => [1.0E+44, 1.0E+44 - Long_Float'Machine (1.0E+44)]]; end System.Powten_LFlt; diff --git a/gcc/ada/libgnat/s-powllf.ads b/gcc/ada/libgnat/s-powllf.ads index b1f8ae9..eaba6c1 100644 --- a/gcc/ada/libgnat/s-powllf.ads +++ b/gcc/ada/libgnat/s-powllf.ads @@ -44,60 +44,60 @@ package System.Powten_LLF is -- Largest power of ten exactly representable with a double Long_Long_Float Powten : constant array (0 .. 54, 1 .. 2) of Long_Long_Float := - (00 => (1.0E+00, 0.0), - 01 => (1.0E+01, 0.0), - 02 => (1.0E+02, 0.0), - 03 => (1.0E+03, 0.0), - 04 => (1.0E+04, 0.0), - 05 => (1.0E+05, 0.0), - 06 => (1.0E+06, 0.0), - 07 => (1.0E+07, 0.0), - 08 => (1.0E+08, 0.0), - 09 => (1.0E+09, 0.0), - 10 => (1.0E+10, 0.0), - 11 => (1.0E+11, 0.0), - 12 => (1.0E+12, 0.0), - 13 => (1.0E+13, 0.0), - 14 => (1.0E+14, 0.0), - 15 => (1.0E+15, 0.0), - 16 => (1.0E+16, 0.0), - 17 => (1.0E+17, 0.0), - 18 => (1.0E+18, 0.0), - 19 => (1.0E+19, 0.0), - 20 => (1.0E+20, 0.0), - 21 => (1.0E+21, 0.0), - 22 => (1.0E+22, 0.0), - 23 => (1.0E+23, 1.0E+23 - Long_Long_Float'Machine (1.0E+23)), - 24 => (1.0E+24, 1.0E+24 - Long_Long_Float'Machine (1.0E+24)), - 25 => (1.0E+25, 1.0E+25 - Long_Long_Float'Machine (1.0E+25)), - 26 => (1.0E+26, 1.0E+26 - Long_Long_Float'Machine (1.0E+26)), - 27 => (1.0E+27, 1.0E+27 - Long_Long_Float'Machine (1.0E+27)), - 28 => (1.0E+28, 1.0E+28 - Long_Long_Float'Machine (1.0E+28)), - 29 => (1.0E+29, 1.0E+29 - Long_Long_Float'Machine (1.0E+29)), - 30 => (1.0E+30, 1.0E+30 - Long_Long_Float'Machine (1.0E+30)), - 31 => (1.0E+31, 1.0E+31 - Long_Long_Float'Machine (1.0E+31)), - 32 => (1.0E+32, 1.0E+32 - Long_Long_Float'Machine (1.0E+32)), - 33 => (1.0E+33, 1.0E+33 - Long_Long_Float'Machine (1.0E+33)), - 34 => (1.0E+34, 1.0E+34 - Long_Long_Float'Machine (1.0E+34)), - 35 => (1.0E+35, 1.0E+35 - Long_Long_Float'Machine (1.0E+35)), - 36 => (1.0E+36, 1.0E+36 - Long_Long_Float'Machine (1.0E+36)), - 37 => (1.0E+37, 1.0E+37 - Long_Long_Float'Machine (1.0E+37)), - 38 => (1.0E+38, 1.0E+38 - Long_Long_Float'Machine (1.0E+38)), - 39 => (1.0E+39, 1.0E+39 - Long_Long_Float'Machine (1.0E+39)), - 40 => (1.0E+40, 1.0E+40 - Long_Long_Float'Machine (1.0E+40)), - 41 => (1.0E+41, 1.0E+41 - Long_Long_Float'Machine (1.0E+41)), - 42 => (1.0E+42, 1.0E+42 - Long_Long_Float'Machine (1.0E+42)), - 43 => (1.0E+43, 1.0E+43 - Long_Long_Float'Machine (1.0E+43)), - 44 => (1.0E+44, 1.0E+44 - Long_Long_Float'Machine (1.0E+44)), - 45 => (1.0E+45, 1.0E+45 - Long_Long_Float'Machine (1.0E+45)), - 46 => (1.0E+46, 1.0E+46 - Long_Long_Float'Machine (1.0E+46)), - 47 => (1.0E+47, 1.0E+47 - Long_Long_Float'Machine (1.0E+47)), - 48 => (1.0E+48, 1.0E+48 - Long_Long_Float'Machine (1.0E+48)), - 49 => (1.0E+49, 1.0E+49 - Long_Long_Float'Machine (1.0E+49)), - 50 => (1.0E+50, 1.0E+50 - Long_Long_Float'Machine (1.0E+50)), - 51 => (1.0E+51, 1.0E+51 - Long_Long_Float'Machine (1.0E+51)), - 52 => (1.0E+52, 1.0E+52 - Long_Long_Float'Machine (1.0E+52)), - 53 => (1.0E+53, 1.0E+53 - Long_Long_Float'Machine (1.0E+53)), - 54 => (1.0E+54, 1.0E+54 - Long_Long_Float'Machine (1.0E+54))); + [00 => [1.0E+00, 0.0], + 01 => [1.0E+01, 0.0], + 02 => [1.0E+02, 0.0], + 03 => [1.0E+03, 0.0], + 04 => [1.0E+04, 0.0], + 05 => [1.0E+05, 0.0], + 06 => [1.0E+06, 0.0], + 07 => [1.0E+07, 0.0], + 08 => [1.0E+08, 0.0], + 09 => [1.0E+09, 0.0], + 10 => [1.0E+10, 0.0], + 11 => [1.0E+11, 0.0], + 12 => [1.0E+12, 0.0], + 13 => [1.0E+13, 0.0], + 14 => [1.0E+14, 0.0], + 15 => [1.0E+15, 0.0], + 16 => [1.0E+16, 0.0], + 17 => [1.0E+17, 0.0], + 18 => [1.0E+18, 0.0], + 19 => [1.0E+19, 0.0], + 20 => [1.0E+20, 0.0], + 21 => [1.0E+21, 0.0], + 22 => [1.0E+22, 0.0], + 23 => [1.0E+23, 1.0E+23 - Long_Long_Float'Machine (1.0E+23)], + 24 => [1.0E+24, 1.0E+24 - Long_Long_Float'Machine (1.0E+24)], + 25 => [1.0E+25, 1.0E+25 - Long_Long_Float'Machine (1.0E+25)], + 26 => [1.0E+26, 1.0E+26 - Long_Long_Float'Machine (1.0E+26)], + 27 => [1.0E+27, 1.0E+27 - Long_Long_Float'Machine (1.0E+27)], + 28 => [1.0E+28, 1.0E+28 - Long_Long_Float'Machine (1.0E+28)], + 29 => [1.0E+29, 1.0E+29 - Long_Long_Float'Machine (1.0E+29)], + 30 => [1.0E+30, 1.0E+30 - Long_Long_Float'Machine (1.0E+30)], + 31 => [1.0E+31, 1.0E+31 - Long_Long_Float'Machine (1.0E+31)], + 32 => [1.0E+32, 1.0E+32 - Long_Long_Float'Machine (1.0E+32)], + 33 => [1.0E+33, 1.0E+33 - Long_Long_Float'Machine (1.0E+33)], + 34 => [1.0E+34, 1.0E+34 - Long_Long_Float'Machine (1.0E+34)], + 35 => [1.0E+35, 1.0E+35 - Long_Long_Float'Machine (1.0E+35)], + 36 => [1.0E+36, 1.0E+36 - Long_Long_Float'Machine (1.0E+36)], + 37 => [1.0E+37, 1.0E+37 - Long_Long_Float'Machine (1.0E+37)], + 38 => [1.0E+38, 1.0E+38 - Long_Long_Float'Machine (1.0E+38)], + 39 => [1.0E+39, 1.0E+39 - Long_Long_Float'Machine (1.0E+39)], + 40 => [1.0E+40, 1.0E+40 - Long_Long_Float'Machine (1.0E+40)], + 41 => [1.0E+41, 1.0E+41 - Long_Long_Float'Machine (1.0E+41)], + 42 => [1.0E+42, 1.0E+42 - Long_Long_Float'Machine (1.0E+42)], + 43 => [1.0E+43, 1.0E+43 - Long_Long_Float'Machine (1.0E+43)], + 44 => [1.0E+44, 1.0E+44 - Long_Long_Float'Machine (1.0E+44)], + 45 => [1.0E+45, 1.0E+45 - Long_Long_Float'Machine (1.0E+45)], + 46 => [1.0E+46, 1.0E+46 - Long_Long_Float'Machine (1.0E+46)], + 47 => [1.0E+47, 1.0E+47 - Long_Long_Float'Machine (1.0E+47)], + 48 => [1.0E+48, 1.0E+48 - Long_Long_Float'Machine (1.0E+48)], + 49 => [1.0E+49, 1.0E+49 - Long_Long_Float'Machine (1.0E+49)], + 50 => [1.0E+50, 1.0E+50 - Long_Long_Float'Machine (1.0E+50)], + 51 => [1.0E+51, 1.0E+51 - Long_Long_Float'Machine (1.0E+51)], + 52 => [1.0E+52, 1.0E+52 - Long_Long_Float'Machine (1.0E+52)], + 53 => [1.0E+53, 1.0E+53 - Long_Long_Float'Machine (1.0E+53)], + 54 => [1.0E+54, 1.0E+54 - Long_Long_Float'Machine (1.0E+54)]]; end System.Powten_LLF; diff --git a/gcc/ada/libgnat/s-rannum.adb b/gcc/ada/libgnat/s-rannum.adb index 92a91a6..147cc9a 100644 --- a/gcc/ada/libgnat/s-rannum.adb +++ b/gcc/ada/libgnat/s-rannum.adb @@ -109,7 +109,7 @@ is Upper_Mask : constant := 2**31; Matrix_A : constant array (State_Val range 0 .. 1) of State_Val - := (0, 16#9908b0df#); + := [0, 16#9908b0df#]; -- The twist transformation is represented by a matrix of the form -- -- [ 0 I(31) ] @@ -275,16 +275,16 @@ is Trailing_Ones : constant array (Unsigned_32 range 0 .. 15) of Bit_Count := - (2#00000# => 0, 2#00001# => 1, 2#00010# => 0, 2#00011# => 2, + [2#00000# => 0, 2#00001# => 1, 2#00010# => 0, 2#00011# => 2, 2#00100# => 0, 2#00101# => 1, 2#00110# => 0, 2#00111# => 3, 2#01000# => 0, 2#01001# => 1, 2#01010# => 0, 2#01011# => 2, - 2#01100# => 0, 2#01101# => 1, 2#01110# => 0, 2#01111# => 4); + 2#01100# => 0, 2#01101# => 1, 2#01110# => 0, 2#01111# => 4]; Pow_Tab : constant array (Bit_Count range 0 .. 3) of Real - := (0 => 2.0**(0 - T'Machine_Mantissa), + := [0 => 2.0**(0 - T'Machine_Mantissa), 1 => 2.0**(-1 - T'Machine_Mantissa), 2 => 2.0**(-2 - T'Machine_Mantissa), - 3 => 2.0**(-3 - T'Machine_Mantissa)); + 3 => 2.0**(-3 - T'Machine_Mantissa)]; Extra_Bits : constant Natural := (Unsigned'Size - T'Machine_Mantissa + 1); @@ -662,7 +662,7 @@ is Result : Image_String; begin - Result := (others => ' '); + Result := [others => ' ']; for J in Of_State'Range loop Insert_Image (Result, J, Of_State (J)); @@ -675,7 +675,7 @@ is Result : Image_String; begin - Result := (others => ' '); + Result := [others => ' ']; for J in 0 .. N - 1 loop Insert_Image (Result, J, Gen.S ((J + Gen.I) mod N)); end loop; diff --git a/gcc/ada/libgnat/s-rannum.ads b/gcc/ada/libgnat/s-rannum.ads index 99ed57d..24c8d7f 100644 --- a/gcc/ada/libgnat/s-rannum.ads +++ b/gcc/ada/libgnat/s-rannum.ads @@ -157,7 +157,7 @@ private Writable : Writable_Access (Generator'Access); -- This self reference allows functions to modify Generator arguments - S : State := (others => 0); + S : State := [others => 0]; -- The shift register, a circular buffer I : Integer := N; diff --git a/gcc/ada/libgnat/s-regexp.adb b/gcc/ada/libgnat/s-regexp.adb index 8f1940a..bb21ef7 100644 --- a/gcc/ada/libgnat/s-regexp.adb +++ b/gcc/ada/libgnat/s-regexp.adb @@ -124,7 +124,7 @@ package body System.Regexp is -- The pattern which is really compiled (when the pattern is case -- insensitive, we convert this string to lower-cases). - Map : Mapping := (others => 0); + Map : Mapping := [others => 0]; -- Mapping between characters and columns in the tables Alphabet_Size : Column_Index := 0; @@ -1103,7 +1103,7 @@ package body System.Regexp is -- Start of processing for Create_Primary_Table begin - Table.all := (others => (others => 0)); + Table.all := [others => [others => 0]]; Create_Simple (S'First, S'Last, Start_State, End_State); Num_States := Current_State; end Create_Primary_Table; @@ -1372,7 +1372,7 @@ package body System.Regexp is -- Start of processing for Create_Primary_Table_Glob begin - Table.all := (others => (others => 0)); + Table.all := [others => [others => 0]]; Create_Simple (S'First, S'Last, Start_State, End_State); Num_States := Current_State; end Create_Primary_Table_Glob; @@ -1392,7 +1392,7 @@ package body System.Regexp is pragma Pack (Meta_State); -- Whether a state from first_table belongs to a metastate. - No_States : constant Meta_State := (others => False); + No_States : constant Meta_State := [others => False]; type Meta_States_Array is array (State_Index range <>) of Meta_State; type Meta_States_List is access all Meta_States_Array; @@ -1444,25 +1444,25 @@ package body System.Regexp is if Meta_States = null then Meta_States := new Meta_States_Array (1 .. State_Index'Max (Last_Index, Meta) + 1); - Meta_States (Meta_States'Range) := (others => No_States); + Meta_States (Meta_States'Range) := [others => No_States]; Table := new Meta_States_Transition_Arr (1 .. State_Index'Max (Last_Index, Meta) + 1); - Table.all := (others => (others => 0)); + Table.all := [others => [others => 0]]; elsif Meta > Meta_States'Last then Meta_States := new Meta_States_Array (1 .. State_Index'Max (2 * Tmp'Last, Meta)); Meta_States (Tmp'Range) := Tmp.all; Meta_States (Tmp'Last + 1 .. Meta_States'Last) := - (others => No_States); + [others => No_States]; Unchecked_Free (Tmp); Table := new Meta_States_Transition_Arr (1 .. State_Index'Max (2 * Tmp2'Last, Meta) + 1); Table (Tmp2'Range) := Tmp2.all; Table (Tmp2'Last + 1 .. Table'Last) := - (others => (others => 0)); + [others => [others => 0]]; Unchecked_Free (Tmp2); end if; end Ensure_Meta_State; @@ -1595,9 +1595,9 @@ package body System.Regexp is R => new Regexp_Value' (Alphabet_Size => 0, Num_States => 1, - Map => (others => 0), - States => (others => (others => 1)), - Is_Final => (others => True), + Map => [others => 0], + States => [others => [others => 1]], + Is_Final => [others => True], Case_Sensitive => True)); end if; @@ -1726,7 +1726,7 @@ package body System.Regexp is New_Columns := Table'Last (2) * (Column / Table'Last (2) + 1); New_Table := new Regexp_Array (Table'First (1) .. New_Lines, Table'First (2) .. New_Columns); - New_Table.all := (others => (others => 0)); + New_Table.all := [others => [others => 0]]; for J in Table'Range (1) loop for K in Table'Range (2) loop diff --git a/gcc/ada/libgnat/s-regpat.adb b/gcc/ada/libgnat/s-regpat.adb index b40f682..00833bb 100644 --- a/gcc/ada/libgnat/s-regpat.adb +++ b/gcc/ada/libgnat/s-regpat.adb @@ -199,7 +199,7 @@ package body System.Regpat is type Bit_Conversion_Array is array (Class_Byte range 0 .. 7) of Class_Byte; Bit_Conversion : constant Bit_Conversion_Array := - (1, 2, 4, 8, 16, 32, 64, 128); + [1, 2, 4, 8, 16, 32, 64, 128]; type Std_Class is (ANYOF_NONE, ANYOF_ALNUM, -- Alphanumeric class [a-zA-Z0-9] @@ -2111,9 +2111,9 @@ package body System.Regpat is declare Point : constant String := Pointer'Image (Index); begin - Put ((1 .. 4 - Point'Length => ' ') + Put ([1 .. 4 - Point'Length => ' '] & Point & ":" - & (1 .. Local_Indent * 2 => ' ') & Opcode'Image (Op)); + & [1 .. Local_Indent * 2 => ' '] & Opcode'Image (Op)); end; -- Print the parenthesis number @@ -2506,11 +2506,11 @@ package body System.Regpat is begin if Prefix then - Put ((1 .. 5 - Pos'Length => ' ')); + Put ([1 .. 5 - Pos'Length => ' ']); Put (Pos & " <" & Data (Input_Pos .. Integer'Min (Last_In_Data, Input_Pos + Length - 1))); - Put ((1 .. Length - 1 - Last_In_Data + Input_Pos => ' ')); + Put ([1 .. Length - 1 - Last_In_Data + Input_Pos => ' ']); Put ("> |"); else @@ -2527,7 +2527,7 @@ package body System.Regpat is procedure Dump_Error (Msg : String) is begin Put (" | "); - Put ((1 .. Dump_Indent * 2 => ' ')); + Put ([1 .. Dump_Indent * 2 => ' ']); Put_Line (Msg); end Dump_Error; @@ -3381,7 +3381,7 @@ package body System.Regpat is begin Input_Pos := Pos; Last_Paren := 0; - Matches_Full := (others => No_Match); + Matches_Full := [others => No_Match]; if Match (Program_First) then Matches_Full (0) := (Pos, Input_Pos - 1); @@ -3397,7 +3397,7 @@ package body System.Regpat is -- Do we have the regexp Never_Match? if Self.Size = 0 then - Matches := (others => No_Match); + Matches := [others => No_Match]; return; end if; @@ -3420,7 +3420,7 @@ package body System.Regpat is end loop; if Next_Try = 0 then - Matches := (others => No_Match); + Matches := [others => No_Match]; return; -- Not present end if; end; @@ -3740,7 +3740,7 @@ package body System.Regpat is procedure Reset_Class (Bitmap : out Character_Class) is begin - Bitmap := (others => 0); + Bitmap := [others => 0]; end Reset_Class; ------------------ diff --git a/gcc/ada/libgnat/s-regpat.ads b/gcc/ada/libgnat/s-regpat.ads index 8fac30a..637e76c 100644 --- a/gcc/ada/libgnat/s-regpat.ads +++ b/gcc/ada/libgnat/s-regpat.ads @@ -639,10 +639,10 @@ private Paren_Count : Natural := 0; -- # paren groups Flags : Regexp_Flags := No_Flags; Program : Program_Data (Program_First .. Size) := - (others => ASCII.NUL); + [others => ASCII.NUL]; end record; Never_Match : constant Pattern_Matcher := - (0, ASCII.NUL, False, 0, 0, 0, No_Flags, (others => ASCII.NUL)); + (0, ASCII.NUL, False, 0, 0, 0, No_Flags, [others => ASCII.NUL]); end System.Regpat; diff --git a/gcc/ada/libgnat/s-scaval__128.adb b/gcc/ada/libgnat/s-scaval__128.adb index 7bb5696..2276fcc 100644 --- a/gcc/ada/libgnat/s-scaval__128.adb +++ b/gcc/ada/libgnat/s-scaval__128.adb @@ -180,7 +180,7 @@ package body System.Scalar_Values is IV_Ilf := To_ByteLF (IS_Iu8); if EFloat then - IV_Ill := (0, 0, 0, 0, 0, 0, 0, 16#C0#, 16#FF#, 16#FF#, 0, 0); + IV_Ill := [0, 0, 0, 0, 0, 0, 0, 16#C0#, 16#FF#, 16#FF#, 0, 0]; end if; -- LO (Low values) @@ -209,7 +209,7 @@ package body System.Scalar_Values is IV_Ilf := To_ByteLF (16#FFF0_0000_0000_0000#); if EFloat then - IV_Ill := (0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#FF#, 0, 0); + IV_Ill := [0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#FF#, 0, 0]; end if; -- HI (High values) @@ -238,7 +238,7 @@ package body System.Scalar_Values is IV_Ilf := To_ByteLF (16#7FF0_0000_0000_0000#); if EFloat then - IV_Ill := (0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#7F#, 0, 0); + IV_Ill := [0, 0, 0, 0, 0, 0, 0, 16#80#, 16#FF#, 16#7F#, 0, 0]; end if; -- -Shh (hex byte) @@ -281,7 +281,7 @@ package body System.Scalar_Values is IV_Ilf := To_ByteLF (IS_Is8); if EFloat then - IV_Ill := (B, B, B, B, B, B, B, B, B, B, B, B); + IV_Ill := [B, B, B, B, B, B, B, B, B, B, B, B]; end if; end if; diff --git a/gcc/ada/libgnat/s-statxd.adb b/gcc/ada/libgnat/s-statxd.adb index af88f7d..4de49a9 100644 --- a/gcc/ada/libgnat/s-statxd.adb +++ b/gcc/ada/libgnat/s-statxd.adb @@ -72,40 +72,40 @@ package body System.Stream_Attributes.XDR is type Precision is (Single, Double, Quadruple); - Fields : constant array (Precision) of Field_Type := ( + Fields : constant array (Precision) of Field_Type := [ -- Single precision - (E_Size => 8, + [E_Size => 8, E_Bias => 127, F_Size => 23, E_Last => 2 ** 8 - 1, F_Mask => 16#7F#, -- 2 ** 7 - 1, E_Bytes => 2, F_Bytes => 3, - F_Bits => 23 mod US), + F_Bits => 23 mod US], -- Double precision - (E_Size => 11, + [E_Size => 11, E_Bias => 1023, F_Size => 52, E_Last => 2 ** 11 - 1, F_Mask => 16#0F#, -- 2 ** 4 - 1, E_Bytes => 2, F_Bytes => 7, - F_Bits => 52 mod US), + F_Bits => 52 mod US], -- Quadruple precision - (E_Size => 15, + [E_Size => 15, E_Bias => 16383, F_Size => 112, E_Last => 2 ** 8 - 1, F_Mask => 16#FF#, -- 2 ** 8 - 1, E_Bytes => 2, F_Bytes => 14, - F_Bits => 112 mod US)); + F_Bits => 112 mod US]]; -- The representation of all items requires a multiple of four bytes -- (or 32 bits) of data. The bytes are numbered 0 through n-1. The bytes @@ -1244,7 +1244,7 @@ package body System.Stream_Attributes.XDR is Is_Positive : Boolean; E : Integer; F : Float; - S : SEA (1 .. F_L) := (others => 0); + S : SEA (1 .. F_L) := [others => 0]; begin if not Item'Valid then @@ -1390,7 +1390,7 @@ package body System.Stream_Attributes.XDR is Is_Positive : Boolean; E : Integer; F : Long_Float; - S : SEA (1 .. LF_L) := (others => 0); + S : SEA (1 .. LF_L) := [others => 0]; begin if not Item'Valid then @@ -1519,7 +1519,7 @@ package body System.Stream_Attributes.XDR is Is_Positive : Boolean; E : Integer; F : Long_Long_Float := Item; - S : SEA (1 .. LLF_L) := (others => 0); + S : SEA (1 .. LLF_L) := [others => 0]; begin if not Item'Valid then @@ -1737,7 +1737,7 @@ package body System.Stream_Attributes.XDR is Is_Positive : Boolean; E : Integer; F : Short_Float; - S : SEA (1 .. SF_L) := (others => 0); + S : SEA (1 .. SF_L) := [others => 0]; begin if not Item'Valid then diff --git a/gcc/ada/libgnat/s-stausa.adb b/gcc/ada/libgnat/s-stausa.adb index 8bd6c5b..cd34ab6 100644 --- a/gcc/ada/libgnat/s-stausa.adb +++ b/gcc/ada/libgnat/s-stausa.adb @@ -127,10 +127,10 @@ package body System.Stack_Usage is Result_Array := new Result_Array_Type (1 .. Buffer_Size); Result_Array.all := - (others => - (Task_Name => (others => ASCII.NUL), + [others => + [Task_Name => [others => ASCII.NUL], Value => 0, - Stack_Size => 0)); + Stack_Size => 0]]; -- Set the Is_Enabled flag to true, so that the task wrapper knows that -- it has to handle dynamic stack analysis @@ -282,7 +282,7 @@ package body System.Stack_Usage is Analyzer.Pattern_Size := Pattern_Size; Analyzer.Pattern := Pattern; Analyzer.Result_Id := Next_Id; - Analyzer.Task_Name := (others => ' '); + Analyzer.Task_Name := [others => ' ']; -- Compute the task name, and truncate if bigger than Task_Name_Length @@ -455,12 +455,12 @@ package body System.Stack_Usage is Stack_Size_Blanks : constant String (1 .. Max_Stack_Size_Len - Stack_Size_Str'Length) := - (others => ' '); + [others => ' ']; Stack_Usage_Blanks : constant String (1 .. Max_Actual_Use_Len - Actual_Size_Str'Length) := - (others => ' '); + [others => ' ']; begin if Stack_Size_Str'Length > Max_Stack_Size_Len then diff --git a/gcc/ada/libgnat/s-strops.adb b/gcc/ada/libgnat/s-strops.adb index 1644d85..f576692 100644 --- a/gcc/ada/libgnat/s-strops.adb +++ b/gcc/ada/libgnat/s-strops.adb @@ -92,7 +92,7 @@ package body System.String_Ops is function Str_Concat_SC (X : String; Y : Character) return String is begin if X'Length = 0 then - return (1 => Y); + return [Y]; else declare diff --git a/gcc/ada/libgnat/s-valrea.adb b/gcc/ada/libgnat/s-valrea.adb index bc5465c..b37383a 100644 --- a/gcc/ada/libgnat/s-valrea.adb +++ b/gcc/ada/libgnat/s-valrea.adb @@ -63,19 +63,19 @@ package body System.Val_Real is -- index N is the largest K such that N**K <= Num'Last. Maxexp32 : constant array (Base_T) of Positive := - (2 => 127, 3 => 80, 4 => 63, 5 => 55, 6 => 49, + [2 => 127, 3 => 80, 4 => 63, 5 => 55, 6 => 49, 7 => 45, 8 => 42, 9 => 40, 10 => 38, 11 => 37, - 12 => 35, 13 => 34, 14 => 33, 15 => 32, 16 => 31); + 12 => 35, 13 => 34, 14 => 33, 15 => 32, 16 => 31]; Maxexp64 : constant array (Base_T) of Positive := - (2 => 1023, 3 => 646, 4 => 511, 5 => 441, 6 => 396, + [2 => 1023, 3 => 646, 4 => 511, 5 => 441, 6 => 396, 7 => 364, 8 => 341, 9 => 323, 10 => 308, 11 => 296, - 12 => 285, 13 => 276, 14 => 268, 15 => 262, 16 => 255); + 12 => 285, 13 => 276, 14 => 268, 15 => 262, 16 => 255]; Maxexp80 : constant array (Base_T) of Positive := - (2 => 16383, 3 => 10337, 4 => 8191, 5 => 7056, 6 => 6338, + [2 => 16383, 3 => 10337, 4 => 8191, 5 => 7056, 6 => 6338, 7 => 5836, 8 => 5461, 9 => 5168, 10 => 4932, 11 => 4736, - 12 => 4570, 13 => 4427, 14 => 4303, 15 => 4193, 16 => 4095); + 12 => 4570, 13 => 4427, 14 => 4303, 15 => 4193, 16 => 4095]; package Double_Real is new System.Double_Real (Num); use type Double_Real.Double_T; diff --git a/gcc/ada/libgnat/s-wchcon.ads b/gcc/ada/libgnat/s-wchcon.ads index 3e82260..897f595 100644 --- a/gcc/ada/libgnat/s-wchcon.ads +++ b/gcc/ada/libgnat/s-wchcon.ads @@ -167,12 +167,12 @@ package System.WCh_Con is -- no ambiguity in Ada sources, since the above sequences are illegal Ada). WC_Encoding_Letters : constant array (WC_Encoding_Method) of Character := - (WCEM_Hex => 'h', + [WCEM_Hex => 'h', WCEM_Upper => 'u', WCEM_Shift_JIS => 's', WCEM_EUC => 'e', WCEM_UTF8 => '8', - WCEM_Brackets => 'b'); + WCEM_Brackets => 'b']; -- Letters used for selection of wide character encoding method in the -- compiler options (-gnatW? switch) and for Wide_Text_IO (WCEM parameter -- in the form string). @@ -191,12 +191,12 @@ package System.WCh_Con is -- or wide wide character sequence for any of the active encoding methods. WC_Longest_Sequences : constant array (WC_Encoding_Method) of Natural := - (WCEM_Hex => 5, + [WCEM_Hex => 5, WCEM_Upper => 2, WCEM_Shift_JIS => 2, WCEM_EUC => 2, WCEM_UTF8 => 6, - WCEM_Brackets => 12); + WCEM_Brackets => 12]; -- The longest number of characters that can be used for a wide character -- or wide wide character sequence using the given encoding method. diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb index aa49bff..d985003 100644 --- a/gcc/ada/par-ch4.adb +++ b/gcc/ada/par-ch4.adb @@ -1694,6 +1694,10 @@ package body Ch4 is end if; end if; when Tok_Left_Paren => + if Nkind (Aggregate_Node) = N_Aggregate then + Set_Is_Parenthesis_Aggregate (Aggregate_Node); + end if; + T_Right_Paren; when others => raise Program_Error; end case; diff --git a/gcc/ada/scng.adb b/gcc/ada/scng.adb index fd184b5..33a7267 100644 --- a/gcc/ada/scng.adb +++ b/gcc/ada/scng.adb @@ -1425,11 +1425,11 @@ package body Scng is when '[' => - -- [] under -gnatX is an aggregate notation and the special + -- [] under -gnat2022 is an aggregate notation and the special -- wide character notation becomes unsupported since the two -- are ambiguous. - if Extensions_Allowed then + if Ada_Version >= Ada_2022 then Scan_Ptr := Scan_Ptr + 1; Token := Tok_Left_Bracket; return; diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 5f9865e..0d4af65 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -248,7 +248,7 @@ package body Sem_Aggr is -- The procedure works by recursively checking each nested aggregate. -- Specifically, after checking a sub-aggregate nested at the i-th level -- we recursively check all the subaggregates at the i+1-st level (if any). - -- Note that for aggregates analysis and resolution go hand in hand. + -- Note that aggregates analysis and resolution go hand in hand. -- Aggregate analysis has been delayed up to here and it is done while -- resolving the aggregate. -- @@ -918,6 +918,12 @@ package body Sem_Aggr is and then Ekind (Typ) /= E_Record_Type and then Ada_Version >= Ada_2022 then + -- Check for Ada 2022 and () aggregate. + + if not Is_Homogeneous_Aggregate (N) then + Error_Msg_N ("container aggregate must use '['], not ()", N); + end if; + Resolve_Container_Aggregate (N, Typ); elsif Is_Record_Type (Typ) then @@ -1792,6 +1798,21 @@ package body Sem_Aggr is return False; end if; + -- Disable the warning for GNAT Mode to allow for easier transition. + + if Ada_Version >= Ada_2022 + and then Warn_On_Obsolescent_Feature + and then not GNAT_Mode + and then not Is_Homogeneous_Aggregate (N) + and then not Is_Enum_Array_Aggregate (N) + and then Is_Parenthesis_Aggregate (N) + and then Nkind (Parent (N)) /= N_Qualified_Expression + then + Error_Msg_N + ("?j?array aggregate using () is an" & + " obsolescent syntax, use '['] instead", N); + end if; + -- STEP 1: make sure the aggregate is correctly formatted if Present (Component_Associations (N)) then diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 2878fce..9ab2528 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -372,7 +372,7 @@ package Sem_Util is procedure Check_Ambiguous_Aggregate (Call : Node_Id); -- Additional information on an ambiguous call in Ada_2022 when a -- subprogram call has an actual that is an aggregate, and the - -- presence of container aggregates (or types with the correwponding + -- presence of container aggregates (or types with the corresponding -- aspect) provides an additional interpretation. Message indicates -- that an aggregate actual should carry a type qualification. |