From: Steve Baird Date: Fri, 19 Dec 2025 22:08:30 +0000 (-0800) Subject: ada: Ada.Containers.Bounded_Indefinite_Holders follow-up. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=623a5d30a55521869afc1f398858a7736eea3b80;p=thirdparty%2Fgcc.git ada: Ada.Containers.Bounded_Indefinite_Holders follow-up. Suppress warnings generated for a Bounded_Indefinite_Holders instance when compiled for a 32-bit target. The warnings are not useful because the construct being flagged is in code that is dead (for that instance). gcc/ada/ChangeLog: * libgnat/a-cbinho.ads: add Warnings pragmas. --- diff --git a/gcc/ada/libgnat/a-cbinho.ads b/gcc/ada/libgnat/a-cbinho.ads index 0aaacd356aa..ae7d112318a 100644 --- a/gcc/ada/libgnat/a-cbinho.ads +++ b/gcc/ada/libgnat/a-cbinho.ads @@ -187,6 +187,8 @@ private -- overhead except for aforementioned possibility of an alignment-related -- gap between some prefix data and the object itself. + pragma Warnings (Off); -- avoid warnings for exceptions raised in dead code + function Max_Allocation_Overhead_In_Storage_Elements return Storage_Count is (if Element_Size_In_Storage_Elements >= Long_Integer (Integer'Last) then -- If the more precise computation in the else-arm (below) could @@ -208,6 +210,8 @@ private -- though the earlier (earlier at run-time) size check in Replace_Element -- passed. A GNAT-defined attribute could eliminate this issue. + pragma Warnings (On); + -- Compute extra amount needed for space requested for an allocator -- (specifically, in a call to Allocate_From_Subpool) in addition to -- the space required for the allocated object itself.