[Ada] Avoid warnings regarding rep clauses in generics

Pierre-Marie de Rodat derodat@adacore.com
Wed Nov 10 08:58:45 GMT 2021


Representation-related node fields are not set for types in generic
units, so we should not warn based on the values of such fields. Also
avoid printing the values of such fields for -gnatR.

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

gcc/ada/

	* repinfo.adb (List_Common_Type_Info, List_Object_Info): Add
	check for In_Generic_Scope.
	(List_Component_Layout): Check for known static values.
	* sem_ch13.adb (Check_Record_Representation_Clause): Add check
	for In_Generic_Scope.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2646 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211110/4e979377/attachment-0001.bin>


More information about the Gcc-patches mailing list