From: Piotr Trojanek Date: Mon, 9 Jun 2025 14:09:35 +0000 (+0200) Subject: ada: Remove redundant nested aggregates from diagnostics code X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c52c0b0e9089eea8e014c28258e6feca1bbe27be;p=thirdparty%2Fgcc.git ada: Remove redundant nested aggregates from diagnostics code A nested aggregate with a single "others => <>" clause is equivalent to a box itself. Code cleanup; semantics is unaffected. gcc/ada/ChangeLog: * errid.ads (Diagnostic_Entries): Remove nested aggregate. * errsw.adb (Switches): Likewise. --- diff --git a/gcc/ada/errid.ads b/gcc/ada/errid.ads index 21ef79c1401..56516d028bc 100644 --- a/gcc/ada/errid.ads +++ b/gcc/ada/errid.ads @@ -77,7 +77,7 @@ package Errid is -- TODO: the mandatory fields for the documentation file could be changed Diagnostic_Entries : Diagnostics_Registry_Type := - (No_Diagnostic_Id => (others => <>), + (No_Diagnostic_Id => <>, GNAT0001 => (Status => Active, Human_Id => new String'("Default_Iterator_Not_Primitive_Error"), diff --git a/gcc/ada/errsw.adb b/gcc/ada/errsw.adb index f4c4128fa3f..511e00d3b93 100644 --- a/gcc/ada/errsw.adb +++ b/gcc/ada/errsw.adb @@ -30,7 +30,7 @@ package body Errsw is Switches : constant array (Switch_Id) of Switch_Type := (No_Switch_Id => - (others => <>), + <>, gnatwb => (Human_Id => new String'("Warn_On_Bad_Fixed_Value"), Status => Active,