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] |
The compiler incorrectly flags errors on scalar array objects when the restriction No_Default_Initialization applies and the array type is marked Is_Public. This happens because a dummy Init_Proc entity is set on types types marked Is_Public even though they may not have any associated initialization, and the fix is to do this setting only if there is actual default initialization associated with the type. See gnat.dg/specs/array_no_def_init.ads Tested on i686-pc-linux-gnu, committed on trunk 2008-05-26 Gary Dismukes <dismukes@adacore.com> * exp_ch3.adb (Build_Array_Init_Proc): Only set Init_Proc to a dummy init proc entity when there is actual default initialization associated with the component type, to avoid spurious errors on objects of scalar array types that are marked Is_Public when No_Default_Initialization applies.
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] |