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] |
This patch adds code to retrieve the index type of a string literal. Since string literals do not use attribute First_Index, the proper index type is obtained from their low bound. No changes in compiler behavior. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-04-26 Hristian Kirtchev <kirtchev@adacore.com> * einfo.adb, einfo.ads: Remove synthesized attribute Proper_First_Index along with its associations in various nodes. (Proper_First_Index): Removed. * sem_ch4.adb (Analyze_Slice): Alphabetize constants. Add new local variable Index_Type. The index type of a string literal subtype is that of the stored low bound. * sem_eval (Get_Static_Length): Remove the use of Proper_First_Index. * sem_res.adb (Resolve_Slice): Alphabetize constants. Add new local variable Index_Type. The index type of a string literal subtype is that of the stored low bound. (Set_String_Literal_Subtype): Code reformatting.
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] |