diff options
author | Bob Duff <duff@adacore.com> | 2021-10-22 12:00:38 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-10-25 15:07:22 +0000 |
commit | 42b39995546a63fe7d9313744cdab21f356346b2 (patch) | |
tree | db228521ca4ebc7e25e5145b8f2b420ff1857ea3 /gcc/ada/uintp.ads | |
parent | ed00b051d907c6f2383c906ee2354c7ba7488dff (diff) | |
download | gcc-42b39995546a63fe7d9313744cdab21f356346b2.zip gcc-42b39995546a63fe7d9313744cdab21f356346b2.tar.gz gcc-42b39995546a63fe7d9313744cdab21f356346b2.tar.bz2 |
[Ada] Follow-on cleanups for Uint fields
gcc/ada/
* freeze.adb (Freeze_Fixed_Point_Type): Remove
previously-inserted test for Uint_0; no longer needed.
* gen_il-gen.ads: Improve comments.
* repinfo.adb (Rep_Value): Use Ubool type for B.
* repinfo.ads (Node_Ref): Use Unegative type.
(Node_Ref_Or_Val): Document that values of this type can be
No_Uint.
* exp_disp.adb (Make_Disp_Requeue_Body): Minor comment fix.
* sem_ch3.adb: Likewise.
* sem_ch8.adb: Likewise.
* sinfo-utils.adb (End_Location): End_Span can never be No_Uint,
so remove the "if No (L)" test.
* uintp.adb (Image_String): Use "for ... of" loop.
* uintp.ads (Unegative): New type for negative integers. We
give it a long name (unlike Unat and Upos) because it is rarely
used.
Diffstat (limited to 'gcc/ada/uintp.ads')
-rw-r--r-- | gcc/ada/uintp.ads | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/uintp.ads b/gcc/ada/uintp.ads index d9f1f8f..08f6738 100644 --- a/gcc/ada/uintp.ads +++ b/gcc/ada/uintp.ads @@ -104,6 +104,7 @@ package Uintp is subtype Unat is Valid_Uint with Predicate => Unat >= Uint_0; -- natural subtype Upos is Valid_Uint with Predicate => Upos >= Uint_1; -- positive subtype Nonzero_Uint is Valid_Uint with Predicate => Nonzero_Uint /= Uint_0; + subtype Unegative is Valid_Uint with Predicate => Unegative < Uint_0; subtype Ubool is Valid_Uint with Predicate => Ubool in Uint_0 | Uint_1; subtype Opt_Ubool is Uint with Predicate => No (Opt_Ubool) or else Opt_Ubool in Ubool; |