From: Steve Baird <[email protected]>
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.
Tested on x86_64-pc-linux-gnu (before the recent bootstrap breakage), committed
on master.
---
gcc/ada/libgnat/a-cbinho.ads | 4 ++++
1 file changed, 4 insertions(+)
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.
--
2.51.0