This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Always set Do_Discriminant_Check flag during semantic analysis


The flag Do_Discriminant_Check was set during semantic analysis only when
expansion was also performed. Now set it unconditionally when needed. Also
clarify in the associated documentation that it is set also for Unchecked_Union
but not expanded into an actual check in that case.

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

2013-04-11  Yannick Moy  <moy@adacore.com>

	* exp_ch4.adb (Expand_N_Selected_Component): Do not expand
	discriminant check for Unchecked_Union.
	* sem_res.adb (Resolve_Selected_Component): Set flag
	Do_Discriminant_Check even when expansion is not performed.
	* sinfo.ads (Do_Discriminant_Check): Update documentation for the case
	of Unchecked_Union.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]