This patch both makes GNAT emit warnings on unused assignments where previously
they were suppressed for obscure reasons and synchronizes routine
Get_Enclosing_Object with a similar routine in GNATprove (which differs in
handling of explicit dereferences).
gcc/ada/ChangeLog:
* sem_util.adb (Get_Enclosing_Object): Traverse unchecked type
conversions since they from the compiler and should be transparent for
semantic reasoning.
=>
return Get_Enclosing_Object (Prefix (N));
- when N_Type_Conversion =>
+ when N_Type_Conversion
+ | N_Unchecked_Type_Conversion
+ =>
return Get_Enclosing_Object (Expression (N));
when others =>