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] Constants and hidden state


This patch modifies the treatment of constants within the state space of a
package. Constants that appear in the hidden state space may or may not act
as constituents or possess indicator Part_Of. This is because the compiler
cannot accurately determine whether a constant has variable input which in
turn classifies it as a hidden state.

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

2015-05-22  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Analyze_Pragma): Remove the detection
	of a useless Part_Of indicator when the related item is a constant.
	(Check_Matching_Constituent): Do not emit an error on a constant.
	(Check_Missing_Part_Of): Do not check for a missing Part_Of indicator
	when the related item is a constant.
	(Collect_Body_States): Code cleanup.
	(Collect_Visible_States): Code cleanup.
	(Report_Unused_States): Do not emit an error on a constant.
	* sem_util.ads, sem_util.adb (Has_Variable_Input): Removed.

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]