From: Piotr Trojanek Date: Tue, 18 Feb 2025 13:38:24 +0000 (+0100) Subject: ada: Add null exclusion to registration of floating-point types X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e349587dec0eed4f0183c7ddc7b7392612e5547;p=thirdparty%2Fgcc.git ada: Add null exclusion to registration of floating-point types Null exclusion both clarifies the intention of the code and allows GNAT to eliminate runtime checks where possible (or make them fail where violated), at least in developer builds. Code cleanup. gcc/ada/ChangeLog: * get_targ.ads (Register_Proc_Type): Add null exclusion. --- diff --git a/gcc/ada/get_targ.ads b/gcc/ada/get_targ.ads index 35cf00d73a1..4b658f10884 100644 --- a/gcc/ada/get_targ.ads +++ b/gcc/ada/get_targ.ads @@ -113,7 +113,7 @@ package Get_Targ is type C_String is array (0 .. 255) of aliased Character; pragma Convention (C, C_String); - type Register_Type_Proc is access procedure + type Register_Type_Proc is not null access procedure (C_Name : C_String; -- Nul-terminated string with name of type Digs : Natural; -- Digits for floating point, 0 otherwise Complex : Boolean; -- True iff type has real and imaginary parts