[Ada] Variable-sized node types: improve error messages

Pierre-Marie de Rodat derodat@adacore.com
Tue Jun 15 10:20:52 GMT 2021


Give a better error message when we run out of fields.

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

gcc/ada/

	* gen_il-gen.adb (To_Bit_Offset): Use 'Base to avoid overflow in
	computations in Last_Bit when Offset = 'Last.
	(Choose_Offset): Give a better error message when we run out of
	fields.  In particular, point out that
	Gen_IL.Internals.Bit_Offset'Last needs to be increased.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1245 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210615/5a236f3b/attachment-0001.bin>


More information about the Gcc-patches mailing list