The ELIMINATED overflow checking mode, enabled either by a pragma or a
command line switch, requires Long_Long_Integer'Size to 64 (because of
the assumptions in the System.Bignums library). GNAT emitted a cryptic
error when this requirement was not satisfied, e.g. when using a target
configuration file with a characteristics of a non-GNAT compiler.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Get_Overflow_Mode): Reword error message.
* switch-c.adb (Get_Overflow_Mode): Likewise.
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -20418,7 +20418,8 @@ package body Sem_Prag is
elsif Chars (Argx) = Name_Eliminated then
if Ttypes.Standard_Long_Long_Integer_Size /= 64 then
Error_Pragma_Arg
- ("Eliminated not implemented on this target", Argx);
+ ("Eliminated requires Long_Long_Integer'Size = 64",
+ Argx);
else
return Eliminated;
end if;
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb
--- a/gcc/ada/switch-c.adb
+++ b/gcc/ada/switch-c.adb
@@ -112,7 +112,7 @@ package body Switch.C is
when '3' =>
if Standard_Long_Long_Integer_Size /= 64 then
- Bad_Switch ("-gnato3 not implemented for this configuration");
+ Bad_Switch ("-gnato3 requires Long_Long_Integer'Size = 64");
else
return Eliminated;
end if;