]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Add Type_Size_For function to Uintp package
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 13 Sep 2024 09:53:00 +0000 (11:53 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 25 Oct 2024 09:09:01 +0000 (11:09 +0200)
commit77f6918222a3a9ff8bc3f6ea59656105c883f8df
tree969a50ad164496dcfe501075a97eec2e248c212f
parent2e81389c3aea7d5a1d1f5b1716b7fab1114d0a91
ada: Add Type_Size_For function to Uintp package

It computes the size of an integer type that can accommodate the input.

gcc/ada/ChangeLog:

* uintp.ads (Type_Size_For): New function declaration.
* uintp.adb (Type_Size_For): New function body.
* exp_imgv.adb (Rewrite_Object_Image): Call Type_Size_For to get
the size of a narrower integer type.
gcc/ada/exp_imgv.adb
gcc/ada/uintp.adb
gcc/ada/uintp.ads