[Ada] Fix bug in node/entity kind numbers in sinfo/einfo.h

Pierre-Marie de Rodat derodat@adacore.com
Wed Jun 30 09:30:45 GMT 2021

This patch fixes a bug in the node/entity kinds that are generated by
Gen_IL in sinfo/einfo.h. These numbers should be the same as the 'Pos of
the corresponding enumeration literals in Node_Kind and Entity_Kind.

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


	* gen_il-gen.adb (Put_C_Type_And_Subtypes): Put the correct
	* gen_il-internals.ads, gen_il-internals.adb: (Pos): Remove this
	function. It was assuming that the order of the enumeration
	literals in Type_Enum is the same as the order of the generated
	types Node_Kind and Entity_Kind, which is not true.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 3415 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210630/12b18350/attachment.bin>

More information about the Gcc-patches mailing list