aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/checks.adb
AgeCommit message (Collapse)AuthorFilesLines
2014-02-25[multiple changes]Arnaud Charlet1-15/+25
2014-02-25 Yannick Moy <moy@adacore.com> * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb, sem_ch6.adb: Remove useless references to SPARK RM in error messages. 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com> * sem_res.adb (Appears_In_Check): New routine. (Resolve_Entity_Name): Remove local variables Prev and Usage_OK. Par is now a constant. Remove the parent chain traversal as the placement of a volatile object with enabled property Async_Writers and/or Effective_Reads must appear immediately within a legal construct. 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Apply_Selected_Range_Checks): Alphabetize local constants and variables. Add comments. Always insert a range check that requires runtime evaluation into the tree. From-SVN: r208128
2014-02-20einfo.ads: Minor comment addition: Etype of package is Standard_Void_Type.Robert Dewar1-7/+7
2014-02-20 Robert Dewar <dewar@adacore.com> * einfo.ads: Minor comment addition: Etype of package is Standard_Void_Type. * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb, exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb, exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb, freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb, sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To. Replace all calls with calls to New_Occurrence_Of. 2014-02-20 Robert Dewar <dewar@adacore.com> * par-util.adb (Ignore, case of right paren): Make this a serious error. From-SVN: r207942
2014-02-06exp_util.ads, [...]: Minor reformatting and code clean ups.Robert Dewar1-1/+1
2014-02-06 Robert Dewar <dewar@adacore.com> * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb: Minor reformatting and code clean ups. From-SVN: r207540
2014-02-06[multiple changes]Arnaud Charlet1-19/+25
2014-02-06 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local variable Expr. Flag clauses with extra parenthesis as this is not allowed by the syntax of the pragma. Code reformatting. 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize variables. Rename variabme Tnn to Temp. Do not create a temporary if assertions are disabled. Find enclosing routine _Postconditions and insert the temporary that captures the value of the prefix before the routine. * exp_ch6.adb (Build_Postconditions_Procedure): Insert the generated _Postconditions routine before the first source declaration of the related subprogram. (Insert_After_Last_Declaration): Removed. (Insert_Before_First_Source_Declaration): New routine. 2014-02-06 Ed Schonberg <schonberg@adacore.com> * exp_util.adb, exp_util.ads (Within_Internal_Subprogram): Utility to determine whether current expansion is for the body of a predefined primitive operation. (Make_Predicate_Check): Use Within_Internal_Subpgram * checks.adb (Apply_Predicate_Check): Use Within_Internal_Subprogram * sem_ch13.adb (Freeze_Entity_Checks): Ditto. 2014-02-06 Pascal Obry <obry@adacore.com> * prj.ads, prj-util.adb: Minor reformatting. From-SVN: r207537
2014-01-29a-except-2005.adb, [...]: Minor reformatting.Robert Dewar1-21/+21
2014-01-29 Robert Dewar <dewar@adacore.com> * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb, ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads, a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads, a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb, atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb, a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb, cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb, eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb, freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb, gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads, krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads, live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb, par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb, par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb, rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads, sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb, sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb, s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads, sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb, s-regpat.adb, s-secsta.adb, s-stalib.ads, s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb, s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb, s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads, system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb, urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting. From-SVN: r207260
2014-01-29checks.adb: minor clarification.Ed Schonberg1-2/+3
2014-01-29 Ed Schonberg <schonberg@adacore.com> * checks.adb: minor clarification. * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit search for primitive operations to the entities that immediately follow the type declaration. From-SVN: r207248
2014-01-29[multiple changes]Arnaud Charlet1-3/+12
2014-01-29 Tristan Gingold <gingold@adacore.com> * exp_ch9.adb (Build_Protected_Entry): Do not call Complete_Entry_Body anymore. * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove. * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove. 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com> * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty string when the Name input bigger than allowed. Adapt the function specification. 2014-01-29 Ed Schonberg <schonberg@adacore.com> * checks.adb (Install_Null_Excluding_Check): Do not emit warning if expression is within a case_expression of if_expression. From-SVN: r207247
2014-01-24[multiple changes]Arnaud Charlet1-16/+20
2014-01-24 Robert Dewar <dewar@adacore.com> * checks.adb (Expr_Known_Valid): Result of fpt operator never considered valid. 2014-01-24 Eric Botcazou <ebotcazou@adacore.com> * back_end.adb: Minor fix in comment. 2014-01-24 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration required to report the error in case of task types. 2014-01-24 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb: Additional index checking. From-SVN: r207035
2014-01-22[multiple changes]Arnaud Charlet1-0/+4
2014-01-22 Thomas Quinot <quinot@adacore.com> * rtsfind.adb: Update comment. 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com> * sem_aux.ads, sem_aux.adb (Is_Body): New routine. * sem_ch3.adb (Analyze_Declarations): Add local variable Body_Seen. Generate the spec of a late controlled primitive body that is about to freeze its related type. (Handle_Late_Controlled_Primitive): New routine. 2014-01-22 Robert Dewar <dewar@adacore.com> * a-stream.adb: Minor reformatting. 2014-01-22 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (From_Actual_Package): Introduce a recursive sub-procedure Declared_In_Actual to handle properly the visibility of actuals in actual packages, that are themselves actuals to a actual package of the current instance. This mimics properly the visibility of formals of formal packages declared with a box, within the corresponding generic unit. 2014-01-22 Robert Dewar <dewar@adacore.com> * checks.adb: Do not assume that a volatile variable is valid. 2014-01-22 Thomas Quinot <quinot@adacore.com> * g-catiio.ads (Image, Value): Clarify that these functions operate in the local time zone. Minor documentation update. 2014-01-22 Thomas Quinot <quinot@adacore.com> * csets.adb, csets.ads, opt.ads: Minor documentation fixes. From-SVN: r206930
2014-01-21[multiple changes]Arnaud Charlet1-69/+53
2014-01-21 Robert Dewar <dewar@adacore.com> * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting. 2014-01-21 Pascal Obry <obry@adacore.com> * projects.texi: Minor typo fix. 2014-01-21 Thomas Quinot <quinot@adacore.com> * freeze.adb (Check_Component_Storage_Order): If a record type has an explicit Scalar_Storage_Order attribute definition clause, reject any component that itself is of a composite type and does not have one. 2014-01-21 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Generate_Parent_Reference): Make public so it can be used to generate proper cross-reference information for the parent units of proper bodies. 2014-01-21 Thomas Quinot <quinot@adacore.com> * gcc-interface/decl.c (gnat_to_gnu_entity): For a modular type that represents a bit packed array type, propagate the reverse storage order flag to the generated wrapper record. * exp_pakd.adb (Expand_Packed_Element_Set, Expand_Packed_Element_Reference): No byte swapping required in the front-end for the case of a reverse storage order array, as this is now handled uniformly in the back-end. However we still need to swap back an extracted element if it is itself a nested composite with reverse storage order. From-SVN: r206890
2014-01-21[multiple changes]Arnaud Charlet1-3/+3
2014-01-21 Arnaud Charlet <charlet@adacore.com> * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add call to Abort_Undefer, as expected by the runtime. * s-tasren.adb (Local_Complete_Rendezvous): Replace Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be deferred at this point. Update comments. 2014-01-21 Thomas Quinot <quinot@adacore.com> * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting. 2014-01-21 Arnaud Charlet <charlet@adacore.com> * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal, remove from doc. From-SVN: r206873
2014-01-20[multiple changes]Arnaud Charlet1-1/+1
2014-01-20 Robert Dewar <dewar@adacore.com> * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * opt.adb (SPARK_Mode_Config): Handled like other config flags * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config): New flag (Config_Switches_Type): Add SPARK_Mode field * sem.adb: Minor code reorganization (remove unnecessary with) * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode from spec if needed * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode from spec if needed * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope): Restore SPARK_Mode * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name of Get_SPARK_Mode_Id * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed SPARK_Mode_Type 2014-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb: Add semantic information to rewritten type reference. 2014-01-20 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides are of a type with unknown discriminants, convert both to the underlying view of the type, so that the proper constraint check can be applied to the right-hand side. 2014-01-20 Robert Dewar <dewar@adacore.com> * atree.adb (Copy_Node): Fix failure to copy last component (Exchange_Entities): Fix failure to exchange last entity 2014-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb: Code clean up. From-SVN: r206844
2014-01-20[multiple changes]Arnaud Charlet1-16/+32
2014-01-20 Robert Dewar <dewar@adacore.com> * checks.adb: Make warnings on exceptions into errors in GNATprove mode. * errout.adb: Implement [ and ] insertion characters. * errout.ads: Document new [ and ] insertion characters. * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor addition of ??? comment. * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb, sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb: Make warnings on exceptions into errors in GNATprove mode. * sem_dim.adb: Minor reformatting throughout Quote [ and ] in error messages. 2014-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb: Code clean up. From-SVN: r206841
2014-01-20gnat_rm.texi (Allow_Integer_Address): Remove note about not allowed if ↵Robert Dewar1-13/+0
address is non-private, no longer true. 2014-01-20 Robert Dewar <dewar@adacore.com> * gnat_rm.texi (Allow_Integer_Address): Remove note about not allowed if address is non-private, no longer true. * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address): Remove check for address being private, causes difficulty when pragma used in gnat.adc file and is not needed, since we guard this in Address_Integer_Convert_OK. * exp_ch7.adb: Minor reformatting. * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode. 2014-01-20 Robert Dewar <dewar@adacore.com> * checks.adb (Apply_Range_Check): Remove gnatprove special casing of exponentiation. * sem_res.adb (Resolve_Op_Expon): Apply range check to right operand for integer case to check range against Natural. From-SVN: r206833
2014-01-20[multiple changes]Arnaud Charlet1-0/+13
2014-01-20 Arnaud Charlet <charlet@adacore.com> * s-tataat.adb (Initialize_Attributes): Abort might already be deferred in Create_Task. 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Apply_Scalar_Range_Check): Flag the exponent as requiring a range check when the expression is an exponentiation. From-SVN: r206831
2014-01-20[multiple changes]Arnaud Charlet1-2/+4
2014-01-20 Robert Dewar <dewar@adacore.com> * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting. * sem_res.adb (Resolve): Fix error causing infinite loop for integer used as address. Allow addresses as integers. 2014-01-20 Arnaud Charlet <charlet@adacore.com> * s-osinte-linux.ads (struct_sigaction): Fix rep clause. 2014-01-20 Bob Duff <duff@adacore.com> * par-ch8.adb (P_Use_Type_Clause): Detect syntax error when "use all" is not followed by "type". From-SVN: r206829
2014-01-20[multiple changes]Arnaud Charlet1-0/+12
2014-01-20 Bob Duff <duff@adacore.com> * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort followed by free. 2014-01-20 Ed Schonberg <schonberg@adacore.com> * checks.adb (Apply_Address_Clause_Check): If there is an alignment check on the expression in an address clause, and there is no local exception propagation, add an additional explanatory message to clarify the cause of previous warning. From-SVN: r206828
2014-01-20sem_aggr.adb, [...]: Minor reformatting.Robert Dewar1-1/+1
2014-01-20 Robert Dewar <dewar@adacore.com> * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb, checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb, expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb, sem_ch8.adb, exp_dist.adb: Minor reformatting. From-SVN: r206813
2014-01-20exp_spark.adb (Expand_SPARK_Call): Remove procedure.Yannick Moy1-11/+11
2014-01-20 Yannick Moy <moy@adacore.com> * exp_spark.adb (Expand_SPARK_Call): Remove procedure. * opt.adb, opt.ads (Full_Expander_Active): Remove function. * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb, * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by Expander_Active. 2014-01-20 Yannick Moy <moy@adacore.com> * sinfo.ads Update documentation of GNATprove mode. From-SVN: r206806
2013-10-17exp_util.adb (Get_Current_Value_Condition, [...]): Handle the case of ↵Thomas Quinot1-0/+7
expressions with actions * exp_util.adb (Insert_Actions):... 2013-10-17 Thomas Quinot <quinot@adacore.com> * exp_util.adb (Get_Current_Value_Condition, Set_Current_Value_Condition): Handle the case of expressions with actions * exp_util.adb (Insert_Actions): Handle the case of an expression with actions whose Actions list is empty. * exp_util.adb (Remove_Side_Effects.Side_Effect_Free): An expression with actions that has no Actions and whose Expression is side effect free is itself side effect free. * exp_util.adb (Remove_Side_Effects): Do not set an incorrect etype on temporary 'R' (Def_Id), which is in general an access to Exp_Type, not an Exp_Type. * sem_res.adb (Resolve): For an expression with actions, resolve the expression early. * sem_res.adb (Resolve_Expression_With_Actions): Rewrite an expression with actions whose value is compile time known and which has no actions into just its expression, so that its constant value is available downstream. * sem_res.adb (Resolve_Short_Circuit): Wrap the left operand in an expression with actions to contain any required finalization actions. * exp_ch4.adb (Expand_Expression_With_Actions): For an expression with actions returning a Boolean expression, ensure any finalization action is kept within the Actions list. * sem_warn.adb (Check_References, Check_Unset_Reference): add missing circuitry to handle expressions with actions. * checks.adb (Ensure_Valid): For an expression with actions, insert the validity check on the Expression. * sem_ch13.adb (Build_Static_Predicate.Get_RList): An expression with actions that has a non-empty Actions list is not static. An expression with actions that has an empty Actions list has the static ranges of its Expression. * sem_util.adb (Has_No_Obvious_Side_Effects): An expression with actions with an empty Actions list has no obvious side effects if its Expression itsekf has no obvious side effects. From-SVN: r203763
2013-10-15[multiple changes]Arnaud Charlet1-6/+35
2013-10-15 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Constituent): When a state acts as a constituent of another state, ensure that the said state has a Part_Of dependency in its corresponding aspect/pragma Abstract_State. 2013-10-15 Robert Dewar <dewar@adacore.com> * par-ch4.adb (P_If_expression): Handle redundant ELSE cleanly. 2013-10-15 Thomas Quinot <quinot@adacore.com> * atree.ads (New_Copy, Relocate_Node): Improve documentation (note that these subprograms reset Is_Overloaded). 2013-10-15 Thomas Quinot <quinot@adacore.com> * checks.adb (Check_Needed): Handle the case where the test in the left operand of the short circuit is wrapped in a qualified expression, type conversion, or expression with actions. 2013-10-15 Thomas Quinot <quinot@adacore.com> * sem_type.adb, sem_type.ads (Save_Interps): Also propagate Is_Overloaded to New_N, for consistency. 2013-10-15 Ed Schonberg <schonberg@adacore.com> * a-tienau.adb (Put): Use file parameter to query values of current column and line length. From-SVN: r203595
2013-10-14exp_attr.adb (Expand_N_Attribute_Reference): Add error entry for ↵Robert Dewar1-3/+14
Library_Level attribute (which should not survive to expansion) 2013-10-14 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Add error entry for Library_Level attribute (which should not survive to expansion) * gnat_rm.texi: Document attribute Library_Level * sem_attr.adb (Analyze_Attribute, case Library_Level): Implement this new attribute (Set_Boolean_Result): Replaces Set_Result (Check_Standard_Prefix): Document that Check_E0 is called (Check_System_Prefix): New procedure * snames.ads-tmpl: Add entry for Library_Level attribute 2013-10-14 Robert Dewar <dewar@adacore.com> * exp_ch6.adb, sinfo.ads: Minor reformatting. * checks.adb (Overlap_Check): Use identifier casing in messages. From-SVN: r203528
2013-07-05[multiple changes]Arnaud Charlet1-26/+99
2013-07-05 Robert Dewar <dewar@adacore.com> * a-cfhase.adb, sem_prag.adb, a-cfhama.adb: Minor reformatting. 2013-07-05 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Copy_Generic_Node): Check that name in function call is a valid entity name before preserving entity in generic copy. 2013-07-05 Thomas Quinot <quinot@adacore.com> * par-ch5.adb: Minor reformatting. 2013-07-05 Thomas Quinot <quinot@adacore.com> * sinfo.ads: Minor clarification to documentation for N_Implicit_Label_Declaration. 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com> * a-except-2005.adb, a-except.adb: Add constant Rmsg_17. Correct the values of all remaining constants. (Rcheck_35): New routine along with pragmas Export and No_Return. (Rcheck_PE_Aliased_Parameters): New routine along with pragmas Export and No_Return. (Rcheck_PE_All_Guards_Closed, Rcheck_PE_Bad_Predicated_Generic_Type, Rcheck_PE_Current_Task_In_Entry_Body, Rcheck_PE_Duplicated_Entry_Address, Rcheck_PE_Explicit_Raise, Rcheck_PE_Implicit_Return, Rcheck_PE_Misaligned_Address_Value, Rcheck_PE_Missing_Return, Rcheck_PE_Overlaid_Controlled_Object, Rcheck_PE_Potentially_Blocking_Operation Rcheck_PE_Stubbed_Subprogram_Called, Rcheck_PE_Unchecked_Union_Restriction, Rcheck_PE_Non_Transportable_Actual, Rcheck_SE_Empty_Storage_Pool, Rcheck_SE_Explicit_Raise, Rcheck_SE_Infinite_Recursion, Rcheck_SE_Object_Too_Large, Rcheck_PE_Finalize_Raised_Exception): Update the use of Rmsg_XX. (Rcheck_17, Rcheck_18, Rcheck_19, Rcheck_20, Rcheck_21, Rcheck_22, Rcheck_23, Rcheck_24, Rcheck_25, Rcheck_26, Rcheck_27, Rcheck_28, Rcheck_29, Rcheck_30, Rcheck_31, Rcheck_32, Rcheck_33, Rcheck_34, Rcheck_35): Update corresponding renamed subprograms. * checks.adb: Add with and use clause for Stringt. (Apply_Parameter_Aliasing_Checks): Make constant Loc visible in all subprograms of Apply_Parameter_Aliasing_Checks. Remove local variable Cond. Initialize Check at the start of the routine. Use routine Overlap_Check to construct a simple or a detailed run-time check. Update the creation of the simple check. (Overlap_Check): New routine. * exp_ch11.adb (Get_RT_Exception_Name): Add a value for PE_Aliased_Parameters. * types.ads: Add new enumeration literal PE_Aliased_Parameters. Update the corresponding integer values of all RT_Exception_Code literals. * types.h: Add new constant PE_Aliased_Parameters. Correct the values of all remaining constants. 2013-07-05 Yannick Moy <moy@adacore.com> * gnat_rm.texi: Minor renaming of SPARK into SPARK 2005 in documentation. From-SVN: r200690
2013-04-25[multiple changes]Arnaud Charlet1-2/+2
2013-04-25 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Apply_Predicate_Check): Update the comment associated with the call to Check_Expression_Against_Static_Predicate. * sem_ch3.adb (Analyze_Object_Declaration): Update the comment associated with the call to Check_Expression_Against_Static_Predicate. * sem_util.adb (Check_Expression_Against_Static_Predicate): Broaden the check from a static expression to an expression with a known value at compile time. * sem_util.ads (Check_Expression_Against_Static_Predicate): Update comment on usage. 2013-04-25 Thomas Quinot <quinot@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference, cases Position, First_Bit, and Last_Bit): Fix incorrect test in implementation of RM 2005 13.5.2(3/2). 2013-04-25 Claire Dross <dross@adacore.com> * a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads, a-cfhama.adb, a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads (Query_Element): Removed. (Update_Element): Removed. (Insert): The version with no New_Item specified is removed. (Iterate): Removed. (Write): Removed. (Read): Removed. Every check of fields Busy and Lock has been removed. 2013-04-25 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Analyze_Pragma, case Contract_Cases): Remove call to S14_Pragma (Find_Related_Subprogram): Require proper placement in subprogram body (Find_Related_Subprogram): Detect duplicates for all cases (Find_Related_Subprogram): Handle case of spec nested inside body. From-SVN: r198297
2013-04-25[multiple changes]Arnaud Charlet1-23/+4
2013-04-25 Arnaud Charlet <charlet@adacore.com> * par-prag.adb: Fix typo. 2013-04-25 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Apply_Predicate_Check): If the type has a static predicate and the expression is also static, check whether the expression satisfies the predicate. * sem_ch3.adb (Analyze_Object_Declaration): If the type has a static predicate and the expression is also static, see if the expression satisfies the predicate. * sem_util.adb: Alphabetize several routines. (Check_Expression_Against_Static_Predicate): New routine. * sem_util.ads (Check_Expression_Against_Static_Predicate): New routine. From-SVN: r198296
2013-04-24[multiple changes]Arnaud Charlet1-14/+18
2013-04-24 Robert Dewar <dewar@adacore.com> * sem_type.adb, exp_attr.adb, exp_ch4.adb: Minor reformatting. 2013-04-24 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Document 'Update attribute. * sem_attr.adb (Analyze_Attribute, case Update): Remove call to S14_Attribute (S14_Attribute): removed. 2013-04-24 Robert Dewar <dewar@adacore.com> * interfac.ads: Add size clauses for IEEE_Float_32/64 2013-04-24 Claire Dross <dross@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Remove special assignment of Use_Expression_With_Actions for SPARK_Mode. 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Apply_Predicate_Check): Check for the presence of the dynamic predicate aspect when trying to determine if the predicate of a type is non-static. * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check for the presence of the dynamic predicate aspect when trying to determine if the predicate of a type is non- static. * sem_ch13.adb (Add_Call): Capture the nature of the inherited ancestor predicate. (Build_Predicate_Functions): Update comments. Rewrite the checks on static predicate application. Complain about the form of a non-static expression only when the type is static. 2013-04-24 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb: Add guard to tree traversal. 2013-04-24 Vincent Celier <celier@adacore.com> * clean.adb (Clean): Remove local variable Root_Environment, use Makeutl.Root_Environment instead. * gnatcmd.adb: Remove local variable Root_Environment, use Makeutl.Root_Environment instead. * make.adb (Gnatmake): Remove local variable Root_Environment, use Makeutl.Root_Environment instead. * prj-makr.adb: Remove local variable Root_Environment, use Makeutl.Root_Environment instead. From-SVN: r198243
2013-04-24[multiple changes]Arnaud Charlet1-0/+9
2013-04-24 Vincent Celier <celier@adacore.com> * gnat_ugn.texi: Document new gnatls switch -aPdir. * gnatcmd.adb: Pass switch -aP<dir> to gnatls. * gnatls.adb (Scan_Ls_Arg): Process new switch -aP<dir>. Issue a warning for unknown switches. (Usage): Add line for new switch -aPdir. 2013-04-24 Ed Schonberg <schonberg@adacore.com> * sem_util.adb, sem_util.ads (Is_Limited_Class_Wide_Type): Return true if the type comes from a limited view, so that task attributes can be constructed. 2013-04-24 Yannick Moy <moy@adacore.com> * checks.adb (Apply_Float_Conversion_Check): Do not apply checks if full expansion is not enabled. 2013-04-24 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Create_Extra_Formals): In Ada 2012, create extra formals if the type does not yet have a completion, and thus has no underlying view. 2013-04-24 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Treat an aspect specification for Address as a reference, to suppress warnings on entities that may be read by an external device. From-SVN: r198237
2013-04-24[multiple changes]Arnaud Charlet1-0/+13
2013-04-24 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Process_Convention): Move Stdcall tests to Set_Convention_From_Pragma so that they are applied to each entry of a homonym set. (Process_Convention): Don't try to set convention if already set. 2013-04-24 Robert Dewar <dewar@adacore.com> * gnatbind.adb: Minor reformatting. 2013-04-24 Vincent Celier <celier@adacore.com> * clean.adb (Gnatclean): Add the default project search directories in the project search path after scanning the switches on the command line. (Initialize): Do not put the default project search directories in the project search path. * gnatcmd.adb (GNATcmd): Add the default project search directories in the project search path after scanning the switches on the command line. * make.adb (Initialize): Add the default project search directories in the project search path after scanning the switches on the command line. 2013-04-24 Yannick Moy <moy@adacore.com> * restrict.ads (Restriction_Warnings): Initialize with all False value. 2013-04-24 Robert Dewar <dewar@adacore.com> * checks.ads, checks.adb (Predicate_Checks_Suppressed): New function. * exp_util.ads, exp_util.adb (Make_Predicate_Check): Check setting of Predicate_Check. * snames.ads-tmpl (Name_Predicate_Check): New check name. * types.ads (Predicate_Check): New definition. * gnat_rm.texi: Add documentation for Predicate_Check. From-SVN: r198226
2013-04-23sem_aux.adb [...] (Effectively_has_Constrained_Partial_View): Rename ↵Ed Schonberg1-1/+1
subprogram as Object_Type_Has_Constrained_Partial_View... 2013-04-23 Ed Schonberg <schonberg@adacore.com> * sem_aux.adb sem_aux.ads (Effectively_has_Constrained_Partial_View): Rename subprogram as Object_Type_Has_Constrained_Partial_View, better description of purpose. * checks.adb (Apply_Discriminant_Check): Use above renaming. * sem_ch4.adb (Analyze_Allocator): Check Has_Constrained_Partial_View of the base type, rather than using the Object_Type predicate. * sem_attr.adb (Analyze_Attribute, case 'Access): Use above renaming. * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): ditto. * exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained): Ditto. * exp_ch4.adb (Expand_N_Allocator): Ditto. From-SVN: r198188
2013-04-12[multiple changes]Arnaud Charlet1-1/+1
2013-04-12 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency clause where both input and output lists are null. (Analyze_Pragma): Update the grammar of pragma Depends. 2013-04-12 Vincent Celier <celier@adacore.com> * gnatbind.adb (No_Restriction_List): Exclude restrictions that take a parameter value, not a count. * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure. * projects.texi: Complete documentation of attribute Roots. 2013-04-12 Thomas Quinot <quinot@adacore.com> * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb, sem_ch3.adb: Minor reformatting. * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation improvement: note that the computation is pessimistic for bit packed arrays. * gnat_rm.texi (Range_Length): Fix minor error in description of attribute. From-SVN: r197912
2013-04-12[multiple changes]Arnaud Charlet1-3/+3
2013-04-12 Robert Dewar <dewar@adacore.com> * checks.adb, sem_elab.adb, repinfo.adb, sem_ch4.adb, restrict.adb, restrict.ads: Minor reformatting. 2013-04-12 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb: Retrieve original name of classwide type if any. 2013-04-12 Thomas Quinot <quinot@adacore.com> * exp_ch11.ads: Minor reformatting. From-SVN: r197910
2013-04-12[multiple changes]Arnaud Charlet1-0/+11
2013-04-12 Arnaud Charlet <charlet@adacore.com> * sem_prag.adb (Set_Imported): Do not generate error for multiple Import in CodePeer mode. * s-rident.ads: Fix minor typo. 2013-04-12 Ed Schonberg <schonberg@adacore.com> * checks.adb (Insert_Valid_Check): Do not insert validity check in the body of the generated predicate function, to prevent infinite recursion. From-SVN: r197908
2013-04-11check.ads, [...] (Install_Null_Excluding_Check): No check in interface ↵Javier Miranda1-0/+7
thunks since it is performed at the caller side. 2013-04-11 Javier Miranda <miranda@adacore.com> * check.ads, exp_ch6.adb (Install_Null_Excluding_Check): No check in interface thunks since it is performed at the caller side. (Expand_Simple_Function_Return): No accessibility check needed in thunks since the check is done by the target routine. From-SVN: r197810
2013-04-11[multiple changes]Arnaud Charlet1-1/+3
2013-04-11 Thomas Quinot <quinot@adacore.com> * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of check for implementation defined identifiers. 2013-04-11 Yannick Moy <moy@adacore.com> * checks.adb (Apply_Type_Conversion_Checks): Add an explanation of why range check and length are put on different nodes. * exp_ch4.adb (Apply_Type_Conversion_Checks): Remove check marks when doing their expansion. From-SVN: r197776
2013-04-11[multiple changes]Arnaud Charlet1-7/+12
2013-04-11 Arnaud Charlet <charlet@adacore.com> * gnat1drv.adb: Minor code clean up. 2013-04-11 Arnaud Charlet <charlet@adacore.com> * debug.adb, sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enumeration rep clauses by default in CodePeer mode, unless -gnatd.I is specified. 2013-04-11 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Safe_To_Capture_Value): If the node belongs to an expression that has been attached to the else_actions of an if-expression, the capture is not safe. 2013-04-11 Yannick Moy <moy@adacore.com> * checks.adb (Apply_Type_Conversion_Checks): Put check mark on type conversion for arrays. 2013-04-11 Robert Dewar <dewar@adacore.com> * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting. 2013-04-11 Johannes Kanig <kanig@adacore.com> * adabkend.adb: Minor comment addition. From-SVN: r197773
2013-02-06[multiple changes]Arnaud Charlet1-6/+6
2013-02-06 Javier Miranda <miranda@adacore.com> * exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate the runtime check on assignment to tagged types if compiling with checks suppressed. 2013-02-06 Robert Dewar <dewar@adacore.com> * exp_util.adb, checks.adb, sem_ch12.adb, sem_res.adb, prj-conf.adb, s-os_lib.adb: Minor reformatting 2013-02-06 Vincent Celier <celier@adacore.com> * ug_words: Add -gnateY = /IGNORE_STYLE_CHECKS_PRAGMAS. 2013-02-06 Ed Schonberg <schonberg@adacore.com> * snames.ads-tmpl: Add Name_Rational and pragma Rational. * par-prag.adb: Recognize pragma Rational. * opt.ads (Rational_Profile): flag to control compatibility mode with Rational compiler. * sem_ch8.adb (Analyze_Subprogram_Renaming): When Rational profile is enable, accept renaming declarations where the new subprogram and the renamed entity have the same name. * sem_prag.adb (analyze_pragma): Add pragma Rational, and recognize Rational as a profile. From-SVN: r195793
2013-02-06[multiple changes]Arnaud Charlet1-4/+14
2013-02-06 Ed Schonberg <schonberg@adacore.com> * checks.adb (Apply_Discriminant_Check): Look for discriminant constraint in full view of private type when needed. * sem_ch12.adb (Validate_Array_Type_Instance): Specialize previous patch to components types that are private and without discriminants. 2013-02-06 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Find_Enclosing_Context): Recognize a simple return statement as one of the cases that require special processing with respect to temporary controlled function results. (Process_Transient_Object): Do attempt to finalize a temporary controlled function result when the associated context is a simple return statement. Instead, leave this task to the general finalization mechanism. 2013-02-06 Thomas Quinot <quinot@adacore.com> * einfo.ads: Minor reformatting. (Status_Flag_Or_Transient_Decl): Add ??? comment. From-SVN: r195791
2013-01-04[multiple changes]Arnaud Charlet1-9/+32
2013-01-04 Robert Dewar <dewar@adacore.com> * warnsw.adb: Minor fixes to -gnatw.d handling. 2013-01-04 Robert Dewar <dewar@adacore.com> * einfo.adb, atree.adb: Enlarge entities to make 63 more flags, 6 more fields. 2013-01-04 Joel Brobecker <brobecker@adacore.com brobecker> * gnat_ugn.texi: Fix typo. 2013-01-04 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Document alignment choice for subtypes. 2013-01-04 Robert Dewar <dewar@adacore.com> * validsw.ads: Minor fix to comment. 2013-01-04 Doug Rupp <rupp@adacore.com> * Makefile.rtl (GNATRTL_NONTASKING_OBJS, GNATRTL_ALTIVEC_OBJS): Factor g-al* objects. * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Add g-al* sources. (GNATRTL_ALTIVEC_OBJS): Override to null for VMS. Rename leon vxworks toolchain as leon-wrs-vxworks. * gcc-interface/Make-lang.in: Update dependencies 2013-01-04 Pascal Obry <obry@adacore.com> * prj.ads (For_Each_Source): Add Locally_Removed parameter. (Source_Iterator): Add Locally_Removed field. * prj.adb (For_Each_Source): Ignore Locally_Removed files if needed. (Next): Likewise. 2013-01-04 Robert Dewar <dewar@adacore.com> * exp_attr.adb: Minor reformatting. 2013-01-04 Robert Dewar <dewar@adacore.com> * checks.adb (Insert_Valid_Check): Fix handling of renamed packed array element. * exp_ch4.adb (Expand_Concatenate): Fix some missing parent fields in generated code. * exp_util.adb (Side_Effect_Free): Improve detection of cases needing renaming. 2013-01-04 Robert Dewar <dewar@adacore.com> * sinfo.ads: Clean up order of N_xxx subtypes 2013-01-04 Vincent Celier <celier@adacore.com> * prj-conf.adb (Check_Target): Allow --autoconf= with no target. From-SVN: r194896
2013-01-04[multiple changes]Arnaud Charlet1-0/+17
2013-01-04 Thomas Quinot <quinot@adacore.com> * sinfo.ads: Minor documentation update. 2013-01-04 Thomas Quinot <quinot@adacore.com> * sem_ch3.adb, einfo.adb (Analyze_Object_Declaration): Do not set Ekind before resolving initialization expression. 2013-01-04 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Generate_Index_Checks): Delay the generation of the check for an indexed component where the prefix mentions Loop_Entry until the attribute has been properly expanded. * exp_ch5.adb (Expand_Loop_Entry_Attributes): Perform minor decoration of the constant that captures the value of Loop_Entry's prefix at the entry point into a loop. Generate index checks for an attribute reference that has been transformed into an indexed component. 2013-01-04 Thomas Quinot <quinot@adacore.com> * exp_prag.adb, exp_util.adb, exp_util.ads, freeze.adb, exp_aggr.adb, sem_ch13.adb (Exp_Aggr.Collect_Initialization_Statements): Nothing to do if Obj is already frozen. (Exp_Util.Find_Init_Call): Rename to... (Exp_Util.Remove_Init_Call): New subprogram, renamed from Find_Init_Call. Remove the initialization call from the enclosing list if found, and if it is from an Initialization_Statements attribute, reset it. (Exp_Util.Append_Freeze_Action): Minor code reorganization. (Exp_Util.Append_Freeze_Actions): Ensure a freeze node has been allocated (as is already done in Append_Freeze_Action). (Freeze.Freeze_Entity): For an object with captured Initialization_Statements and non-delayed freezeing, unwrap the initialization statements and insert and them directly in the enclosing list. (Sem_Ch13.Check_Address_Clause): For an object with Initialization_Statements and an address clause, unwrap the initialization statements when moving them to the freeze actions. From-SVN: r194887
2013-01-03[multiple changes]Arnaud Charlet1-4/+10
2013-01-03 Emmanuel Briot <briot@adacore.com> * xref_lib.adb (Parse_Identifier_Info): Fix handling of arrays, which have information in the ALI file for both the index and the component types. 2013-01-03 Emmanuel Briot <briot@adacore.com> * projects.texi: Fix error in documenting the project path computed for an aggregate project. 2013-01-03 Javier Miranda <miranda@adacore.com> * sem_warn.adb (Warn_On_Overlapping_Actuals): Adding documentation plus restricting the functionality of this routine to cover the cases described in the Ada 2012 reference manual. The previous extended support is now available under -gnatX. * s-tassta.adb (Finalize_Global_Tasks): Addition of a dummy variable to call Timed_Sleep. Required to avoid warning on overlapping out-mode actuals. * opt.ads (Extensions_Allowed): Update documentation. 2013-01-03 Tristan Gingold <gingold@adacore.com> * s-arit64.ads: Use Multiply_With_Ovflo_Check as __gnat_mulv64. * arit64.c: Removed * gcc-interface/Makefile.in: Remove reference to arit64.c. 2013-01-03 Thomas Quinot <quinot@adacore.com> * checks.adb, checks.ads (Apply_Address_Clause_Check): The check must be generated at the start of the freeze actions for the entity, not before (or after) the freeze node. 2013-01-03 Thomas Quinot <quinot@adacore.com> * exp_aggr.adb (Exp_Aggr.Convert_Aggregate_In_Obj_Decl): Reorganize code to capture initialization statements in a block, so that freeze nodes are excluded from the captured block. From-SVN: r194848
2013-01-02checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow.Robert Dewar1-28/+42
2013-01-02 Robert Dewar <dewar@adacore.com> * checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow. * opt.ads, opt.adb: Handle flags Check_Float_Overflow[_Config]. * par-prag.adb: Add dummy entry for pragma Check_Float_Overflow. * sem_prag.adb: Implement pragma Check_Float_Overflow. * snames.ads-tmpl: Add entries for pragma Check_Float_Overflow. * switch-c.adb: Recognize -gnateF switch. * tree_io.ads: Update ASIS version number. * gnat_rm.texi: Add documentation of pragma Check_Float_Overflow. From-SVN: r194788
2013-01-02[multiple changes]Arnaud Charlet1-25/+26
2013-01-02 Robert Dewar <dewar@adacore.com> * checks.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_disp.adb, exp_dist.adb, exp_intr.adb, exp_prag.adb, exp_util.adb, freeze.adb, gnat1drv.adb, inline.adb, layout.adb, lib-xref.adb, par-ch10.adb, par-labl.adb, par-load.adb, par-util.adb, restrict.adb, sem_ch13.adb, sem_ch4.adb, sem_ch6.adb, sem_dim.adb, sem_elab.adb, sem_res.adb, sem_warn.adb, sinput-l.adb: Add tags to warning messages. * sem_ch6.ads, warnsw.ads, opt.ads: Minor comment updates. 2013-01-02 Robert Dewar <dewar@adacore.com> * err_vars.ads: Minor comment fix. 2013-01-02 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb: Refine predicate. From-SVN: r194787
2012-12-05[multiple changes]Arnaud Charlet1-2/+4
2012-12-05 Ed Schonberg <schonberg@adacore.com> * s-rident.ads, restrict.ads: Remove discrepancies between the documentation on implementation-defined restrictions, and the internal data structure used for warnings and errors on implementation-defined restriction violations. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Chain_PPC): Pre- and postcondition aspects are legal on a subprogram body that acts as a spec. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Find_Selected_Component): If the selector name is an overloadable entity but the name is not overloaded, generate reference to it rather than delaying this until resolution. 2012-12-05 Robert Dewar <dewar@adacore.com> * checks.ads, checks.adb (Activate_Overflow_Check): No effect for MOD/REM/unary + * exp_ch4.adb (Expand_N_Op_Mod): Remove call to set Do_Overflow_Check. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Find_Non_Universal_Interpretation): Use the types of the right operand if the left operand is null. 2012-12-05 Sergey Rybin <rybin@adacore.com frybin> * gnat_ugn.texi, vms_data.ads: document gnatpp -nn option. 2012-12-05 Jose Ruiz <ruiz@adacore.com> * init.c (__gnat_install_handler): For the LEON VxWorks kernel run-time library we need to install a trap handler directly in the trap table (no support by the OS) for the software trap 0. From-SVN: r194196
2012-12-05gnat_rm.texi: Update overflow description.Robert Dewar1-31/+31
2012-12-05 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Update overflow description. Pragma Overflow_Checks changed to Overflow_Mode. 2012-12-05 Robert Dewar <dewar@adacore.com> * checks.ads, exp_ch4.adb, gnat1drv.adb, par-prag.adb, sem_prag.adb, snames.ads-tmpl, switch-c.adb, types.ads, checks.adb: Change pragma Overflow_Checks to Overflow_Mode. Separate overflow checking from overflow mode. Several name changes to reflect this separation. CHECKED mode is renamed STRICT mode. From-SVN: r194193
2012-11-06checks.ads, [...]: Minor changes throughout for new overflow checking.Robert Dewar1-139/+176
2012-11-06 Robert Dewar <dewar@adacore.com> * checks.ads, checks.adb, exp_ch4.adb: Minor changes throughout for new overflow checking. * exp_util.adb (Insert_Actions): Remove special casing of Overflow_Check. * gnat1drv.adb (Adjust_Global_Switches): Fixes for new handling of overflow checks. * sem.adb (Analyze): Remove special casing of Overflow_Check (Analyze_List): ditto. * sem_prag.adb (Analyze_Pragma, case Overflow_Checks): Remove SUPPRESSED and change CHECKED to STRICT. * sem_res.adb (Analyze_And_Resolve): No longer treat Overflow_Check specially. (Preanalyze_And_Resolve): ditto. (Resolve): ditto. * snames.ads-tmpl: Replace Name_Checked by Name_Strict. * switch-c.adb (Get_Overflow_Mode): Eliminate 0 setting, CHECKED => STRICT. * types.ads (Overflow_Check_Type): Remove Suppressed, change Checked to Strict (Suppress_Record): Overflow check controlled by Suppress array. From-SVN: r193233
2012-10-29[multiple changes]Arnaud Charlet1-4/+5
2012-10-29 Yannick Moy <moy@adacore.com> * checks.adb (Apply_Arithmetic_Overflow_Minimized_Eliminated): Add special case for case expression alternative. (Is_Signed_Integer_Arithmetic_Op): Remove special case for case expression alternative. * exp_ch4.adb Minor reformatting. 2012-10-29 Thomas Quinot <quinot@adacore.com> * sem_elab.adb: Minor reformatting. 2012-10-29 Bob Duff <duff@adacore.com> * sem_res.adb: Minor: Remove redundant test. From-SVN: r192914
2012-10-05[multiple changes]Arnaud Charlet1-134/+69
2012-10-05 Robert Dewar <dewar@adacore.com> * sem_util.adb (Has_One_Matching_Field): Handle case of lone discriminant. 2012-10-05 Yannick Moy <moy@adacore.com> * checks.adb (Minimize_Eliminate_Overflow_Checks): Correct code for the division operation and exponent operation. Adjust bound for the mod and rem operations. From-SVN: r192126
2012-10-05checks.adb, [...]: Minor reformatting.Robert Dewar1-4/+3
2012-10-05 Robert Dewar <dewar@adacore.com> * checks.adb, checks.ads, s-tassta.adb, s-stposu.adb, s-spsufi.adb, s-spsufi.ads, exp_ch4.adb: Minor reformatting. From-SVN: r192125
2012-10-05[multiple changes]Arnaud Charlet1-68/+66
2012-10-05 Yannick Moy <moy@adacore.com> * switch-c.adb, checks.adb, checks.ads, sem_prag.adb, exp_ch4.adb, osint.adb: Minor correction of typos, and special case for Alfa mode. 2012-10-05 Hristian Kirtchev <kirtchev@adacore.com> * s-spsufi.adb: Add with clause for Ada.Unchecked_Deallocation. Add with and use clauses for System.Finalization_Masters. (Finalize_And_Deallocate): Add an instance of Ada.Unchecked_Deallocation. Merge the code from the now obsolete Finalize_Subpool into this routine. * s-spsufi.ads: Add pragma Preelaborate. * s-stposu.adb: Remove with clause for Ada.Unchecked_Deallocation; Add with and use clauses for System.Storage_Pools.Subpools.Finalization; (Finalize_Pool): Update the comment on all actions takes with respect to a subpool finalization. Finalize and deallocate each individual subpool. (Finalize_Subpool): Removed. (Free): Removed; (Detach): Move from package body to spec. * s-stposu.ads (Detach): Move from package body to spec. (Finalize_Subpool): Removed. 2012-10-05 Arnaud Charlet <charlet@adacore.com> * s-tassta.adb: Update comments. (Vulnerable_Complete_Master): If Free_On_Termination is set, do nothing, and let the task free itself if not already done. From-SVN: r192124
2012-10-04checks.adb (Minimize_Eliminate_Overflow_Checks): Dont reanalyze if/case ↵Robert Dewar1-35/+57
expression if nothing has changed (just reexpand). 2012-10-04 Robert Dewar <dewar@adacore.com> * checks.adb (Minimize_Eliminate_Overflow_Checks): Dont reanalyze if/case expression if nothing has changed (just reexpand). Stops case expression from generating incorrect temporary. * exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow): Fix cut and paste typo for range analysis in NE (not equal) case. * sem_eval.adb (Compile_Time_Compare): Small optimization to catch some more cases. * types.ads (Suppressed_Or_Checked): New subtype of Overflow_Check_Type. From-SVN: r192070