[Ada] AI12-0394 Named Numbers and User-Defined Numeric Literals

Pierre-Marie de Rodat derodat@adacore.com
Tue Nov 24 10:17:02 GMT 2020


Integer named numbers may now be used with types that have an
Integer_Literal aspect.  Real named numbers may be used with types that
have a Real_Literal aspect with an overloading that takes two strings.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* sem_ch13.adb (Validate_Literal_Aspect): Add support for named
	numbers and in particular overload of the Real_Literal function.
	* sem_res.adb (Resolve): Add support for named numbers in
	Real_Literal and Integer_Literal resolution.
	* einfo.adb, einfo.ads (Related_Expression,
	Set_Related_Expression): Allow E_Function.
	* uintp.ads (UI_Image_Max): Bump size of buffer to avoid loosing
	precision.
	* sem_eval.adb: Fix typo in comment.
	* libgnat/a-nbnbin.adb, libgnat/a-nbnbin.ads (From_String):
	Return a Valid_Big_Integer.
	* libgnat/a-nbnbre.adb, libgnat/a-nbnbre.ads (From_String): New
	variant taking two strings. Return a Valid_Big_Real.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 16182 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201124/417634d8/attachment-0001.bin>


More information about the Gcc-patches mailing list