checks.adb (Generate_Range_Check): Replace type conversions with unchecked conversions to support the case of... 2009-07-07 Gary Dismukes <dismukes@adacore.com> * checks.adb (Generate_Range_Check): Replace type conversions with unchecked conversions to support the case of performing range checks on Enum'Val (permits integer values to be converted to enumeration). * exp_attr.adb (Expand_N_Attribute_Reference, cases Attribute_Pred, Attribute_Succ): Set Do_Range_Check to False before calling Expand_Pred_Succ, to prevent gigi from generating any range checks. (Expand_N_Attribute_Reference, case Attribute_Val): Generate a range check when needed (and set Do_Range_Check to False). * exp_ch3.adb (Expand_N_Object_Declaration): Generate a range check on scalar object initialization if needed. * exp_ch4.adb (Expand_Allocator_Expression): Generate range checks when needed on scalar allocators. (Expand_N_Qualified_Expression): Generate range check when needed. (Expand_N_Slice): Remove call to Enable_Range_Check on slice ranges. Checks on slice ranges handled in Resolve_Slice. * exp_ch5.adb (Expand_N_Assignment_Statement): Generate a range check, when needed, for all scalar assignments, not just discrete. (Expand_Simple_Function_Return): Resolve the conversion created for a scalar function return so that the conversion will get expanded to generate a possible constraint check. * exp_ch6.adb (Expand_Actuals): Call Add_Call_By_Copy_Code for out and in out scalar actuals when subtypes don't match, to ensure generation of return checks (and set Do_Range_Check to False). (Expand_Call): Uncomment code to perform range checks, but make it apply only to in and in out parameters (checks on parameter returns are handled in Expand_Actuals). If a scalar actual for a call to a derived subprogram is marked as needing a range check, peform it here (and set Do_Range_Check to False). * sem_aggr.adb (Resolve_*_Aggregate.Resolve_Aggr_Expr): Generate a range check on scalar component associations when needed. * sem_eval.adb (In_Subrange_Of): Return False when the first type has infinities but the second type does not, as these aren't compatible floating-point types. * sem_res.adb (Resolve_Slice): In the case where the prefix of the slice is itself a slice, pick up the Etype of the prefix. This handles the case where the prefix was an Image attribute expanded to a slice, and ensures that we get the subtype with the slice constraint rather than the unconstrained subbtype of the 'Image. From-SVN: r149318
Name |
Last commit
|
Last update |
---|---|---|
INSTALL | Loading commit data... | |
boehm-gc | Loading commit data... | |
config | Loading commit data... | |
contrib | Loading commit data... | |
fixincludes | Loading commit data... | |
gcc | Loading commit data... | |
gnattools | Loading commit data... | |
include | Loading commit data... | |
intl | Loading commit data... | |
libada | Loading commit data... | |
libcpp | Loading commit data... | |
libdecnumber | Loading commit data... | |
libffi | Loading commit data... | |
libgcc | Loading commit data... | |
libgfortran | Loading commit data... | |
libgomp | Loading commit data... | |
libiberty | Loading commit data... | |
libjava | Loading commit data... | |
libmudflap | Loading commit data... | |
libobjc | Loading commit data... | |
libssp | Loading commit data... | |
libstdc++-v3 | Loading commit data... | |
maintainer-scripts | Loading commit data... | |
zlib | Loading commit data... | |
ABOUT-NLS | Loading commit data... | |
COPYING | Loading commit data... | |
COPYING.LIB | Loading commit data... | |
COPYING.RUNTIME | Loading commit data... | |
COPYING3 | Loading commit data... | |
COPYING3.LIB | Loading commit data... | |
ChangeLog | Loading commit data... | |
ChangeLog.tree-ssa | Loading commit data... | |
MAINTAINERS | Loading commit data... | |
Makefile.def | Loading commit data... | |
Makefile.in | Loading commit data... | |
Makefile.tpl | Loading commit data... | |
README | Loading commit data... | |
compile | Loading commit data... | |
config-ml.in | Loading commit data... | |
config.guess | Loading commit data... | |
config.rpath | Loading commit data... | |
config.sub | Loading commit data... | |
configure | Loading commit data... | |
configure.ac | Loading commit data... | |
depcomp | Loading commit data... | |
install-sh | Loading commit data... | |
libtool-ldflags | Loading commit data... | |
libtool.m4 | Loading commit data... | |
ltgcc.m4 | Loading commit data... | |
ltmain.sh | Loading commit data... | |
ltoptions.m4 | Loading commit data... | |
ltsugar.m4 | Loading commit data... | |
ltversion.m4 | Loading commit data... | |
lt~obsolete.m4 | Loading commit data... | |
missing | Loading commit data... | |
mkdep | Loading commit data... | |
mkinstalldirs | Loading commit data... | |
move-if-change | Loading commit data... | |
symlink-tree | Loading commit data... | |
ylwrap | Loading commit data... |