[Ada] Use bracket aggregates in Ada2022
authorMarc Poulhiès <poulhies@adacore.com>
Fri, 5 Nov 2021 09:24:27 +0000 (10:24 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 2 Dec 2021 16:26:27 +0000 (16:26 +0000)
commitb045f2f2205495b61d63133b16e56c35acbf8090
tree6859fd4188a8fde717377e47a344a30411a8cfbf
parentaa937f2cdb8ff6b2dce0b6f3042efe700bd437ec
[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.
108 files changed:
gcc/ada/exp_imgv.adb
gcc/ada/gen_il-fields.ads
gcc/ada/gen_il-gen-gen_nodes.adb
gcc/ada/libgnarl/s-interr.adb
gcc/ada/libgnarl/s-intman.ads
gcc/ada/libgnarl/s-intman__posix.adb
gcc/ada/libgnarl/s-mudido__affinity.adb
gcc/ada/libgnarl/s-osinte__linux.ads
gcc/ada/libgnarl/s-taprop__linux.adb
gcc/ada/libgnarl/s-tasdeb.adb
gcc/ada/libgnarl/s-tasdeb.ads
gcc/ada/libgnarl/s-tasinf__linux.ads
gcc/ada/libgnarl/s-taskin.adb
gcc/ada/libgnarl/s-taskin.ads
gcc/ada/libgnarl/s-tasren.adb
gcc/ada/libgnarl/s-tassta.adb
gcc/ada/libgnarl/s-tataat.adb
gcc/ada/libgnarl/s-tpobop.adb
gcc/ada/libgnat/a-calend.adb
gcc/ada/libgnat/a-calend.ads
gcc/ada/libgnat/a-cfinve.adb
gcc/ada/libgnat/a-chahan.adb
gcc/ada/libgnat/a-chtgbo.adb
gcc/ada/libgnat/a-cobove.adb
gcc/ada/libgnat/a-cofove.adb
gcc/ada/libgnat/a-cohata.ads
gcc/ada/libgnat/a-coinve.adb
gcc/ada/libgnat/a-convec.adb
gcc/ada/libgnat/a-coprnu.ads
gcc/ada/libgnat/a-direct.adb
gcc/ada/libgnat/a-direct.ads
gcc/ada/libgnat/a-direio.adb
gcc/ada/libgnat/a-nbnbre.adb
gcc/ada/libgnat/a-ngrear.adb
gcc/ada/libgnat/a-stbubo.adb
gcc/ada/libgnat/a-stbufo.adb
gcc/ada/libgnat/a-stbuun.adb
gcc/ada/libgnat/a-stbuut.adb
gcc/ada/libgnat/a-stmaco.ads
gcc/ada/libgnat/a-strbou.ads
gcc/ada/libgnat/a-strfix.ads
gcc/ada/libgnat/a-strmap.adb
gcc/ada/libgnat/a-strmap.ads
gcc/ada/libgnat/a-strsup.adb
gcc/ada/libgnat/a-strsup.ads
gcc/ada/libgnat/a-sttebu.adb
gcc/ada/libgnat/a-stuten.ads
gcc/ada/libgnat/a-stwibo.ads
gcc/ada/libgnat/a-stwima.ads
gcc/ada/libgnat/a-stwisu.adb
gcc/ada/libgnat/a-stzbou.ads
gcc/ada/libgnat/a-stzmap.ads
gcc/ada/libgnat/a-stzsup.adb
gcc/ada/libgnat/a-swmwco.ads
gcc/ada/libgnat/a-szmzco.ads
gcc/ada/libgnat/a-teioed.adb
gcc/ada/libgnat/a-wtedit.adb
gcc/ada/libgnat/a-ztedit.adb
gcc/ada/libgnat/g-arrspl.adb
gcc/ada/libgnat/g-catiio.adb
gcc/ada/libgnat/g-cgideb.adb
gcc/ada/libgnat/g-comlin.adb
gcc/ada/libgnat/g-comlin.ads
gcc/ada/libgnat/g-debpoo.adb
gcc/ada/libgnat/g-expect.adb
gcc/ada/libgnat/g-forstr.adb
gcc/ada/libgnat/g-memdum.adb
gcc/ada/libgnat/g-rannum.adb
gcc/ada/libgnat/g-sechas.adb
gcc/ada/libgnat/g-sehamd.ads
gcc/ada/libgnat/g-sehash.ads
gcc/ada/libgnat/g-sercom.ads
gcc/ada/libgnat/g-sercom__linux.adb
gcc/ada/libgnat/g-shsh32.ads
gcc/ada/libgnat/g-shsh64.ads
gcc/ada/libgnat/g-socket.adb
gcc/ada/libgnat/g-socket.ads
gcc/ada/libgnat/g-socpol.adb
gcc/ada/libgnat/g-socpol.ads
gcc/ada/libgnat/g-sothco.ads
gcc/ada/libgnat/g-spipat.adb
gcc/ada/libgnat/i-cobol.ads
gcc/ada/libgnat/i-pacdec.adb
gcc/ada/libgnat/i-pacdec.ads
gcc/ada/libgnat/s-bitops.adb
gcc/ada/libgnat/s-crc32.adb
gcc/ada/libgnat/s-gearop.adb
gcc/ada/libgnat/s-genbig.adb
gcc/ada/libgnat/s-htable.adb
gcc/ada/libgnat/s-imgcha.adb
gcc/ada/libgnat/s-powflt.ads
gcc/ada/libgnat/s-powlfl.ads
gcc/ada/libgnat/s-powllf.ads
gcc/ada/libgnat/s-rannum.adb
gcc/ada/libgnat/s-rannum.ads
gcc/ada/libgnat/s-regexp.adb
gcc/ada/libgnat/s-regpat.adb
gcc/ada/libgnat/s-regpat.ads
gcc/ada/libgnat/s-scaval__128.adb
gcc/ada/libgnat/s-statxd.adb
gcc/ada/libgnat/s-stausa.adb
gcc/ada/libgnat/s-strops.adb
gcc/ada/libgnat/s-valrea.adb
gcc/ada/libgnat/s-wchcon.ads
gcc/ada/par-ch4.adb
gcc/ada/scng.adb
gcc/ada/sem_aggr.adb
gcc/ada/sem_util.ads