[Ada] Reorder code for validity checks of unchecked conversions

Pierre-Marie de Rodat derodat@adacore.com
Wed Jun 16 08:43:55 GMT 2021


The placement of check for types of an unchecked conversion being
generic was done in the middle of switching from their original to
underlying views, which was inconsistent and made the surrounding
comments confusing.

Code cleanup in preparation for a follow-up improvement; behaviour is
unaffected, because the flag Is_Generic_Type is present in all views.

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

gcc/ada/

	* sem_ch13.adb (Validate_Unchecked_Conversion): Move detection
	of generic types before switching to their private views; fix
	style in using AND THEN.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1946 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210616/bc4cdb08/attachment-0001.bin>


More information about the Gcc-patches mailing list