I have this piece of code :
with Ada.Unchecked
private package MyPackage is
function UC_Bool_To_U8 is new Ada.Unchecked_Conversion (Source => Boolean, Target => T_U8);
end MyPackage;
Where T_U8 is :
type T_U8 is range 0 .. 2**7;
Function UC_Bool_To_U8 is working but I have warnings on compilation :
warning: types for unchecked conversion have different sizes
warning: size of "Boolean" is 1, size of "T_U8" is 8
warning: source will be extended with 7 high order zero bits
How can I suppress theses warnings ?