aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/makeutl.adb
AgeCommit message (Collapse)AuthorFilesLines
2017-09-06[multiple changes]Arnaud Charlet1-3595/+0
2017-09-06 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch3.adb, sem_aux.adb, sem_res.adb: Minor reformatting. 2017-09-06 Yannick Moy <moy@adacore.com> * sem_ch12.adb (Analyze_Instance_And_Renamings): Refactor to set global variable Ignore_SPARK_Mode_Pragmas_In_Instance only once. 2017-09-06 Bob Duff <duff@adacore.com> * sem_ch8.adb: Change Assert to be consistent with other similar ones. 2017-09-06 Bob Duff <duff@adacore.com> * binde.adb (Find_Elab_Order): Do not run Elab_Old unless requested. Previously, the -do switch meant "run Elab_New and Elab_Old and use the order chosen by Elab_Old, possibly with debugging printouts comparing the two orders." Now it means "do not run Elab_New." This is of use if there are bugs that cause Elab_New to crash. (Elab_Position, Num_Chosen): Change type to Nat, to avoid various type conversions. * ali.ads (Elab_Position): Change type to Nat, to avoid various type conversions. 2017-09-06 Arnaud Charlet <charlet@adacore.com> * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Fix reference to SPARK RM. 2017-09-06 Eric Botcazou <ebotcazou@adacore.com> * layout.adb: Use SSU short hand consistently throughout the file. 2017-09-06 Eric Botcazou <ebotcazou@adacore.com> * freeze.adb (Freeze_Record_Type) <Sized_Component_Total_Round_RM_Size>: New local variable to accumulate the rounded RM_Size of components. Update it for every component whose RM_Size is statically known. Add missing guard to check that bit packing is really required before issuing the error about packing. Swap condition for clarity's sake. * sem_prag.adb (Usage_Error): fix reference to SPARK RM in comment 2017-09-06 Fedor Rybin <frybin@adacore.com> * makeutl.adb, makeutl.ads, mlib.adb, mlib.ads, mlib-fil.adb, mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb, mlib-tgt.ads, mlib-tgt-specific.adb, mlib-tgt-specific.ads, mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb, mlib-tgt-specific-hpux.adb, mlib-tgt-specific-linux.adb, mlib-tgt-specific-mingw.adb, mlib-tgt-specific-solaris.adb, mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb, mlib-utl.adb, mlib-utl.ads, prj.adb, prj.ads, prj-attr.adb, prj-attr.ads, prj-attr-pm.adb, prj-attr-pm.ads, prj-com.ads, prj-conf.adb, prj-conf.ads, prj-dect.adb, prj-dect.ads, prj-env.adb, prj-env.ads, prj-err.adb, prj-err.ads, prj-ext.adb, prj-ext.ads, prj-makr.adb, prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads, prj-pars.adb, prj-pars.ads, prj-part.adb, prj-part.ads, prj-pp.adb, prj-pp.ads, prj-proc.adb, prj-proc.ads, prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads, prj-util.adb, prj-util.ads, sinput-p.adb, sinput-p.ads: Remove obsolete project manager sources. 2017-09-06 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Assigment): If the left-hand side is an entity of a mutable type and the right-hand side is a conditional expression, resolve the alternatives of the conditional using the base type of the target entity, because the alternatives may have distinct subtypes. This is particularly relevant if the alternatives are aggregates. From-SVN: r251797
2017-01-13sem_aggr.adb, [...]: Update all eligible case statements to reflect the new ↵Hristian Kirtchev1-16/+21
style for case alternatives. 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com> * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb, exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb, layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb, exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb, exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb, g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb, sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb, prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb, a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb, get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb, g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb, sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb, s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb, contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb, g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb, g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb, a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb, ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb, get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb, prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb, exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb, s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb, a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb, a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb, g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb, par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb, uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb, a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case statements to reflect the new style for case alternatives. Various code clean up and reformatting. From-SVN: r244406
2015-02-20[multiple changes]Arnaud Charlet1-2/+4
2015-02-20 Yannick Moy <moy@adacore.com> * sem_prag.ads: Minor typo in comment. 2015-02-20 Pascal Obry <obry@adacore.com> * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode. 2015-02-20 Vincent Celier <celier@adacore.com> * makeutl.adb (Get_Directories.Add_Dir): Add a directory only if it exists. 2015-02-20 Robert Dewar <dewar@adacore.com> * sem_eval.ads: Minor reformatting. 2015-02-20 Eric Botcazou <ebotcazou@adacore.com> * freeze.adb (Size_Known): Do not set the packed size for independent type or component. (Freeze_Array_Type): Check for Independent[_Components] with packing or explicit component size clause. * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation of independence pragmas only for non-GCC back-ends. * sem_ch13.adb (Initialize): Likewise for the initialization. * sem_prag.adb (Record_Independence_Check): New procedure to record an independence check in the table. (Analyze_Pragma): Use it throughout instead of doing it manually. * gcc-interface/decl.c (gnat_to_gnu_field): Add support for independent type or component. 2015-02-20 Thomas Quinot <quinot@adacore.com> * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of struct direct and readdir. This is required for NFS filesystems mounted from servers that use 64-bit cookies. 2015-02-20 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram Build_Subprogram_Renaming, to create renaming of subprogram instance in the the declaration of the wrapper package rather than in its body, so that it is available for analysis of aspects propagated from generic to instantiation. (Check_Mismatch): An actual for a formal package that is an incomplete type matches a formal type that is incomplete. (Instantiate_Package_Body): Move code that builds subprogram renaming to Analyze_Subprogram_Instantiation. (Instantiate_Type): The generated subtype is a limited view if the actual is a limited view. (Load_Parent_Of_Generic): Retrieve instance declaration from its new position within wrapper package. 2015-02-20 Arnaud Charlet <charlet@adacore.com> * s-parame-vxworks.adb, s-os_lib.ads: Update comments. 2015-02-20 Robert Dewar <dewar@adacore.com> * s-osinte-vxworks.ads (To_Timespec): Add comment about the issue of negative arguments. From-SVN: r220850
2015-01-06[multiple changes]Arnaud Charlet1-2/+5
2015-01-06 Robert Dewar <dewar@adacore.com> * exp_util.adb: Change name Name_Table_Boolean to Name_Table_Boolean1. * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1 Introduce Name_Table_Boolean2/3. * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1 Introduce Name_Table_Boolean2/3. * par-ch13.adb: Change name Name_Table_Boolean to Name_Table_Boolean1. 2015-01-06 Bob Duff <duff@adacore.com> * gnat_rm.texi: Improve documentation regarding No_Task_Termination. 2015-01-06 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an others choice that covers multiple components, analyze each copy with the type of the component even in compile-only mode, to detect potential accessibility errors. 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com> * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine. (Resolve_Actuals): An effectively volatile out parameter cannot act as an in or in out actual in a call. (Resolve_Entity_Name): An effectively volatile out parameter cannot be read. 2015-01-06 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is the expansion of an expression function it may be pre-analyzed if a 'access attribute is applied to the function, in which case last_entity may have been assigned already. 2015-01-06 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete type and actual has the corresponding full view, there is no error, but a case of use of incomplete type in a predicate or invariant expression. 2015-01-06 Vincent Celier <celier@adacore.com> * makeutl.adb (Insert_No_Roots): Make sure that the same source in two different project tree is checked in both trees, if they are sources of two different projects, extended or not. 2015-01-06 Arnaud Charlet <charlet@adacore.com> * gnat1drv.adb: Minor code clean up. (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode. 2015-01-06 Bob Duff <duff@adacore.com> * osint.adb (Read_Source_File): Don't print out file name unless T = Source. 2015-01-06 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal): recognize improper uses of constant_reference types as actuals for in-out parameters. (Check_Function_Call): Do not collect identifiers if function name is missing because of previous error. From-SVN: r219231
2014-08-01[multiple changes]Arnaud Charlet1-1/+1
2014-08-01 Gary Dismukes <dismukes@adacore.com> * makeutl.ads, opt.ads: Minor grammar fixes. * makeutl.adb: Minor code reorganization. 2014-08-01 Arnaud Charlet <charlet@adacore.com> * gcc-interface/Makefile.in, gcc-interface/Make-lang.in, gnatsym.adb: Remove gnatsym (VMS only tool). 2014-08-01 Ben Brosgol <brosgol@adacore.com> * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS conditionalization from gnat_ugn.texi and projects.texi, and updated (considerably simplified) xgnatugn.adb, to be removed soon. From-SVN: r213427
2014-08-01debug.adb: Remove doc for gnatmake/gprbuild switch -ds.Vincent Celier1-3/+3
2014-08-01 Vincent Celier <celier@adacore.com> * debug.adb: Remove doc for gnatmake/gprbuild switch -ds. * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message instead of Debug.Debug_Flag_S. * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit error messages. * makeutl.ads (No_Exit_Message_Option): New constant string for switch --no-exit-message. * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False. * switch-m.adb (Scan_Make_Switches): Recognize new switch --no-exit-message. From-SVN: r213424
2014-08-01[multiple changes]Arnaud Charlet1-3/+8
2014-08-01 Arnaud Charlet <charlet@adacore.com> * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used. * gcc-interface/Make-lang.in: Remove exp_vfpt.o 2014-08-01 Javier Miranda <miranda@adacore.com> * inline.ads (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations moved to inline.adb (Cannot_Inline): Update documentation. (Check_And_Build_Body_To_Inline): Renamed. (List_Inlining_Info): Subprogram moved here from package exp_ch6. * inline.adb (Check_Inlining_Restrictions): New local variable. (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations moved here from inline.ads (Number_Of_Statements): Removed. (Remove_Pragmas): Avoid duplicated version of this subprogram. (Build_Body_To_Inline): Code cleanup. (Build_Body_To_Inline.Has_Excluded_Statament): Removed. (Check_And_Build_Body_To_Inline): Renamed. Code cleanup. (Check_Body_To_Inline): Removed. (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body. (Has_Excluded_Declaration): No action if not Check_Inlining_Restrictions. (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions. (Initialize): Initialize the lists of inlined calls and subprograms. (List_Inlining_Info): Subprogram moved here from package exp_ch6. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call to Check_And_Build_Body_To_Inline since it has been renamed as Check_And_Split_Unconstrained_Function * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to package inline. * gnat1drv.adb Update call to Inline.List_Inlining_Info. 2014-08-01 Vincent Celier <celier@adacore.com> * debug.adb: Add documentation for new debug switch -ds. * make.adb (List_Bad_Compilations): Do not issue any message when switch -ds is specified. * makeutl.adb (Fail_Program): Do not issue any message when -ds is specified. (Finish_Program): Ditto. 2014-08-01 Robert Dewar <dewar@adacore.com> * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads, s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads, s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb, indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb, indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb, s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads, s-traces.adb, widechar.ads, stand.adb, s-expint.adb, s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads, s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb, s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads, s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb, s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb, g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb, s-tratas.ads: Minor fix to copyright notices. 2014-08-01 Eric Botcazou <ebotcazou@adacore.com> * sinfo.ads: Remove long obsolete comment. From-SVN: r213423
2014-08-01binde.adb, [...]: Remove VMS handling.Arnaud Charlet1-7/+0
2014-08-01 Arnaud Charlet <charlet@adacore.com> * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb, gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb, make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb, mlib.ads, tempdir.adb: Remove VMS handling. From-SVN: r213413
2014-07-30gnat_ugn.texi: Minor spelling correction.Robert Dewar1-25/+21
2014-07-30 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Minor spelling correction. * makeutl.adb: Minor code reorganization. * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting. 2014-07-30 Robert Dewar <dewar@adacore.com> * einfo.ads (Has_Unchecked_Union): Document that this is used to check for illegal Valid_Scalars attribute references. * exp_attr.adb (Build_Record_VS_Func): New function (Expand_N_Attribute_Reference, case Valid_Scalars): Call this function. * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to Unchecked_Union Add note on 'Valid_Scalars generating a lot of code. * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give error on attempt to apply Valid_Scalars to Unchecked_Union type. From-SVN: r213298
2014-07-30[multiple changes]Arnaud Charlet1-47/+41
2014-07-30 Thomas Quinot <quinot@adacore.com> * lib-writ.ads: document format change. 2014-07-30 Pascal Obry <obry@adacore.com> * prj-util.adb (For_Interface_Sources): Do not include sources from withed externally built projects. 2014-07-30 Robert Dewar <dewar@adacore.com> * lib.adb: Minor reformatting. * prj-util.adb: Minor reformatting. 2014-07-30 Ed Schonberg <schonberg@adacore.com> * exp_aggr.adb (Build_Record_Aggr_Code): For an array component that depends on discriminants, and which is given by an others clause, create an explicit subtype with the discriminant values of the enclosing aggregate, because the backend cannot otherwise retrieve the actual bounds of the array. 2014-07-30 Fedor Rybin <frybin@adacore.com> * gnat_ugn.texi: Improve gnattest documentation. 2014-07-30 Pascal Obry <obry@adacore.com> * makeutl.adb (Insert_Project_Sources): Properly handle sources that are aggregated. We want to include sources not only part of libraries but also if part of an aggregated project from an aggregate library. * prj.adb (For_Project_And_Aggregated_Context): Properly check state of root project. From-SVN: r213296
2014-07-30[multiple changes]Arnaud Charlet1-26/+46
2014-07-30 Vincent Celier <celier@adacore.com> * makeutl.adb (Insert_Project_Sources): When the library project is an aggregate Stand-Alone Library, insert in the queue the Ada interface units, with Closure set to True; 2014-07-30 Eric Botcazou <ebotcazou@adacore.com> * sem_util.adb: Fix minor typo. * makeutl.adb: Minor reformatting. From-SVN: r213294
2014-07-30[multiple changes]Arnaud Charlet1-11/+8
2014-07-30 Robert Dewar <dewar@adacore.com> * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting. 2014-07-30 Yannick Moy <moy@adacore.com> * checks.ads: Fix typo in comment. 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com> * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on entities that materialize range bounds, if any. 2014-07-30 Vincent Celier <celier@adacore.com> * projects.texi: Minor spelling fix. From-SVN: r213292
2014-07-30[multiple changes]Arnaud Charlet1-13/+57
2014-07-30 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Make_Bignum_Block): Use the new secondary stack build routines to manage the mark. * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions): Use the new secodary stack build routines to manage the mark. (Insert_Actions_In_Scope_Around): Add new formal parameter Manage_SS along with comment on its usage. Code and comment reformatting. Mark and release the secondary stack when the context warrants it. (Make_Transient_Block): Update the call to Insert_Actions_In_Scope_Around to account for parameter Manage_SS. (Wrap_Transient_Declaration): Remove local variable Uses_SS. Ensure that the secondary stack is marked and released when the related object declaration appears in a library level package or package body. Code and comment reformatting. * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine. (Build_SS_Release_Call): New routine. 2014-07-30 Steve Baird <baird@adacore.com> * exp_attr.adb: Revert previous change, not needed after all. 2014-07-30 Vincent Celier <celier@adacore.com> * makeutl.adb (Queue.Insert_Project_Sources): Insert with Closure => True for interfaces of Stand-Alone Libraries. * makeutl.ads (Source_Info (Format => Gprbuild)): Add new Boolean component Closure, defaulted to False. 2014-07-30 Yannick Moy <moy@adacore.com> * sem_res.adb: Fix typo in error message. From-SVN: r213291
2014-07-30[multiple changes]Arnaud Charlet1-3/+0
2014-07-30 Olivier Hainque <hainque@adacore.com> * vxworks-ppc-link.spec: New file. Extra link instructions for ppc-vxworks. * vxworks-crtbe-link.spec: Likewise, for ZCX related support. * system-vxworks-ppc.ads: Adjust linker options to use spec files. * system-vxworks-arm.ads: Likewise. * gcc-interface/Makefile.in: Enable .spec files. 2014-07-30 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb: Minor comment reformatting. 2014-07-30 Robert Dewar <dewar@adacore.com> * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed. * sem_warn.adb (Has_Junk_Name): New function (Check_References): Use Has_Junk_Name to delete junk warnings (Check_Unset_Reference): ditto. (Warn_On_Unreferenced_Entity): ditto. (Warn_On_Useless_Assignment): ditto. * sem_ch3.adb, lib-xref-spark_specific.adb, s-taprop-vxworks.adb, exp_ch7.adb, s-asthan-vms-alpha.adb, sem_ch10.adb, osint-c.adb, prj.adb, g-comlin.adb, makeutl.adb, s-tasdeb.adb, exp_intr.adb, s-asthan-vms-ia64.adb, prj-env.adb: Ditto. 2014-07-30 Ed Schonberg <schonberg@adacore.com> * checks.adb (Insert_Valid_Check): Do not check for the packed array type of a prefix that is an access type. 2014-07-30 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute Unconstrained_Array even if prefix is not frozen yet, as can occur with a private subtype used as a generic actual. 2014-07-30 Gary Dismukes <dismukes@adacore.com> * sem_attr.adb: Minor reformatting. 2014-07-30 Pat Rogers <rogers@adacore.com> * gnat_rm.texi: Corrected minor wording error in description of No_Exception_Registration. 2014-07-30 Yannick Moy <moy@adacore.com> * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove mode. Realphabetize two subprograms. * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode. (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id. (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove mode. (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use Is_Inline in GNATprove mode. (Analyze_Subprogram_Specification): Set Is_Inlined_Always at subprogram entity creation. * sem_res.adb (Resolve_Call): Do not deal with inlining during pre-analysis. Issue warning on call to possibly inlined subprogram when body not seen. 2014-07-30 Yannick Moy <moy@adacore.com> * lib-xref.adb (Generate_Reference): Add special case for compiler-generated formals in GNATprove mode. From-SVN: r213264
2014-07-30[multiple changes]Arnaud Charlet1-1/+0
2014-07-30 Robert Dewar <dewar@adacore.com> * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb, g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb, g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb, s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb, g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb, s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting & code reorganization. 2014-07-30 Bob Duff <duff@adacore.com> * s-tassta.adb, sem_util.ads: Minor reformatting. 2014-07-30 Yannick Moy <moy@adacore.com> * inline.adb (Build_Body_To_Inline): Detect when subprogram has multiple returns, or not a single last return statement, in GNATprove mode. (Cannot_Inline): Simplify logic to handle case of GNATprove inlining first. 2014-07-30 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb: Stubs are not subject to inlining. From-SVN: r213257
2014-07-18[multiple changes]Arnaud Charlet1-0/+3
2014-07-18 Robert Dewar <dewar@adacore.com> * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting. 2014-07-18 Vincent Celier <celier@adacore.com> * lib-writ.ads: Update documentation about the D lines. From-SVN: r212796
2014-07-18[multiple changes]Arnaud Charlet1-0/+9
2014-07-18 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Replace_Type_References_Generic): Use type entity as a parameter, rather than its Chars field, in order to locate freeze node of type. If the predicate or invariant has references to types other than the one to which the contract applies, these types must be frozen, and the corresponding predicate functions created, before that freeze node. 2014-07-18 Robert Dewar <dewar@adacore.com> * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization. * par_sco.adb: Minor reformatting. 2014-07-18 Gary Dismukes <dismukes@adacore.com> * exp_ch4.adb (Real_Range_Check): Turn off the Do_Range_Check flag on the conversion's current Expression argument rather than on the originally captured Operand node, as Expression may reflect a rewriting (as in conversions to a fixed-point type). 2014-07-18 Vincent Celier <celier@adacore.com> * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit is not a subunit. * ali.ads (Sdep_Record): New component Unit_Name. * lib-writ.adb (Write_ALI): Write the unit name in D lines. * makeutl.adb (Check_Source_Info_In_ALI): Return False if a dependent unit is in a project and the source file name is not one of its sources. From-SVN: r212795
2014-06-13[multiple changes]Arnaud Charlet1-28/+27
2014-06-13 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change reason to Overflow. 2014-06-13 Robert Dewar <dewar@adacore.com> * makeutl.adb: Minor reformatting. 2014-06-13 Gail Schenker <schenker@adacore.com> * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and associated flag (d.z), no longer needed. 2014-06-13 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and Export aspects, do not check whether a corresponding Convention aspect has been specified. Convention is optional in Ada2012, and defaults to Convention_Ada. From-SVN: r211624
2014-06-13[multiple changes]Arnaud Charlet1-3/+3
2014-06-13 Eric Botcazou <ebotcazou@adacore.com> * checks.adb (Apply_Address_Clause_Check): Only issue the new warning if the propagation warning is issued. 2014-06-13 Thomas Quinot <quinot@adacore.com> * exp_ch4.adb: Minor reformatting. 2014-06-13 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference, case Pred): Handle float range check case (Expand_N_Attribute_Reference, case Succ): Handle float range check case. * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float range check case. 2014-06-13 Vincent Celier <celier@adacore.com> * makeutl.ads (Compute_Builder_Switches): Change name of parameter Root_Environment to Env. * prj-conf.adb (Check_Switches): Call Locate_Runtime with the Env parameter of procedure Get_Or_Create_Configuration_File. (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path of new parameter Env. * prj-conf.ads (Locate_Runtime): New parameter Env of type Prj.Tree.Environment. 2014-06-13 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow. From-SVN: r211623
2014-05-21[multiple changes]Arnaud Charlet1-11/+48
2014-05-21 Robert Dewar <dewar@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Insert_Delayed_Pragma is now used for the case of Attach_Handler. * sem_prag.adb: Minor comment improvements. 2014-05-21 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Install_Body): When checking whether freezing of instantiation must be delayed, verify that the common enclosing subprogram to generic and instance is in fact an overloadable entity. 2014-05-21 Vincent Celier <celier@adacore.com> * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all mains with the same name and fail if there is more than one. * prj.ads, prj.adb (Find_All_Sources): New function From-SVN: r210702
2014-01-29clean.adb (Gnatclean): Fail if main project is an aggregate project or if...Vincent Celier1-0/+20
2014-01-29 Vincent Celier <celier@adacore.com> * clean.adb (Gnatclean): Fail if main project is an aggregate project or if there is an aggregate library project in the project tree. * gnatcmd.adb: Fail if the main project is an aggregate project or if there is an aggegate library project in the project tree. * make.adb (Initialize): : Fail if main project is an aggregate project or if there is an aggregate library project in the project tree. * makeutl.ads (Aggregate_Libraries_In): New Boolean function. * prj-makr.adb (Initialize): Fail if the main project is an aggregate project or an aggregate library project. From-SVN: r207255
2014-01-29[multiple changes]Arnaud Charlet1-6/+8
2014-01-29 Hristian Kirtchev <kirtchev@adacore.com> * einfo.adb Flag264 is now unused. (Has_Body_References): Removed. (Set_Has_Body_References): Removed. (Write_Entity_Flags): Remove the output for flag Has_Body_References. * einfo.ads Update the comment on usage of attribute Body_References. Remove attribute Has_Body_References and its usage in nodes. (Has_Body_References): Removed along with pragma Inline. (Set_Has_Body_References): Removed along with pragma Inline. * sem_prag.adb (Analyze_Global_Item): Move the call to Record_Possible_Body_Reference in the state related checks section. Add a comment intended function. (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference in the state related checks section. Add a comment intended function. (Analyze_Refinement_Clause): Cleanup the illegal body reference reporting. Add a comment on timing of error reporting. (Record_Possible_Body_Reference): Reimplement the routine. 2014-01-29 Vincent Celier <celier@adacore.com> * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for unit-based languages. (Mains.Complete_Mains.Do_Complete): Use the source file project tree when calling Find_File_Add_Extension. Use the correct project name when reporting an error. From-SVN: r207252
2014-01-24[multiple changes]Arnaud Charlet1-0/+18
2014-01-24 Pascal Obry <obry@adacore.com> * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns attribute definition. 2014-01-24 Vincent Celier <celier@adacore.com> * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put in the Queue the same source (same path, same multi-source index) from the same project file, to avoid compiling several times the same source. 2014-01-24 Eric Botcazou <ebotcazou@adacore.com> * einfo.ads (First_Rep_Item): Remove obsolete stuff. (Has_Gigi_Rep_Item): Likewise. * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set Has_Gigi_Rep_Item for objects. * gcc-interface/decl.c (prepend_one_attribute_to): Rename into... (prepend_one_attribute): ...this. (prepend_one_attribute_pragma): New function extracted from... (prepend_attributes): ...here. Swap the parameters for consistency. (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to prepend_attributes. <object>: Deal with a pragma Linker_Section on a constant or variable. <E_Function>: Deal with a pragma Linker_Section on a subprogram. (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to. 2014-01-24 Vincent Celier <celier@adacore.com> * opt.ads: Minor comment update. From-SVN: r207028
2013-04-12makeutl.adb, [...]: Minor reformatting.Robert Dewar1-15/+12
2013-04-12 Robert Dewar <dewar@adacore.com> * makeutl.adb, prj-nmsc.adb: Minor reformatting. 2013-04-12 Robert Dewar <dewar@adacore.com> * exp_util.adb (Make_Invariant_Call): Use Check_Kind instead of Check_Enabled. * gnat_rm.texi (Check_Policy): Update documentation for new Check_Policy syntax. * sem_prag.adb (Check_Kind): Replaces Check_Enabled (Analyze_Pragma, case Check_Policy): Rework to accomodate new syntax (like Assertion_Policy). * sem_prag.ads (Check_Kind): Replaces Check_Enabled. From-SVN: r197920
2013-04-12[multiple changes]Arnaud Charlet1-32/+35
2013-04-12 Doug Rupp <rupp@adacore.com> * init.c (SS$_CONTROLC, SS$_CONTINUE) [VMS]: New macros. (__gnat_handle_vms_condition) [VMS]: Dispatch on the Crtl/C user handler if installed. * ctrl_c.c (__gnat_install_int_handler) [VMS]: Install a dummy sigaction handler to trigger the real user handler dispatch in init.c/__gnat_handle_vms_condition. (__gnat_uninstall_int_handler) [VMS]: Likewise. 2013-04-12 Vincent Celier <celier@adacore.com> * clean.adb (Parse_Cmd_Line): Set Directories_Must_Exist_In_Projects to False if switch is specified. * makeutl.adb (Initialize_Source_Record): Do not look for the object file if there is no object directory. * opt.ads (Directories_Must_Exist_In_Projects): New Boolean variable, defaulted to True. * prj-nmsc.adb (Check_Library_Attributes): Do not fail if library directory does not exist when Directories_Must_Exist_In_Projects is False. (Get_Directories): Do not fail when the object or the exec directory do not exist when Directories_Must_Exist_In_Projects is False. From-SVN: r197918
2013-04-11[multiple changes]Arnaud Charlet1-1/+4
2013-04-11 Ed Schonberg <schonberg@adacore.com> * sem_util.ads, sem_util.adb (Get_Incomplete_View_Of_Ancestor): New function to implement the notion introduced in RM 7.3.1 (5.2/3): in a child unit, a derived type is within the derivation class of an ancestor declared in a parent unit, even if there is an intermediate derivation that does not see the full view of that ancestor. * sem_res.adb (Valid_Conversion): if all else fails, examine if an incomplete view of an ancestor makes a numeric conversion legal. 2013-04-11 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb: in Ada2012 operators can only have in parameters. 2013-04-11 Vincent Celier <celier@adacore.com> * makeutl.adb (Create_Binder_Mapping_File): Do not put into the mapping file ALI files of sources that have been replaced. 2013-04-11 Vincent Celier <celier@adacore.com> * projects.texi: Add subsection Duplicate Sources in Projects. 2013-04-11 Vincent Celier <celier@adacore.com> * gnat_ugn.texi: Add documentation for gnatmake switch -droot_dir/** 2013-04-11 Arnaud Charlet <charlet@adacore.com> * init.c (__gnat_install_handler): Only set up an alternate stack when installing a signal handler for SIGSEGV. 2013-04-11 Thomas Quinot <quinot@adacore.com> * g-socket.adb (Connect_Socket, timeout version): Call underlying connect operation directly, not through the 2-argument Connect_Socket thick binding, in order to avoid raising a junk exception for the EINPROGRESS return. From-SVN: r197775
2013-04-11[multiple changes]Arnaud Charlet1-13/+16
2013-04-11 Robert Dewar <dewar@adacore.com> * s-osprim-mingw.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb. makeutl.adb, sem_ch8.adb: Minor reformatting. 2013-04-11 Vincent Celier <celier@adacore.com> * gnat_ugn.texi: Minor fixes for VMS. * ug_words: Minor addition: -gnato? => /OVERFLOW_CHECKS=?. 2013-04-11 Robert Dewar <dewar@adacore.com> * usage.adb (Usage): Minor edit to -gnatW message 2013-04-11 Robert Dewar <dewar@adacore.com> * exp_aggr.adb (Expand_N_Aggregate): Add circuit for handling others for string literal case. Also add big ??? comment about this new code, which should be redundant, but is not. * sem_eval.adb (Eval_Concatenation): Handle non-static case properly (Eval_String_Literal): Handle non-static literal properly From-SVN: r197744
2013-02-06[multiple changes]Arnaud Charlet1-95/+107
2013-02-06 Robert Dewar <dewar@adacore.com> * osint.ads: Minor fix of typo. 2013-02-06 Sergey Rybin <rybin@adacore.com frybin> * gnat_ugn.texi: gnatmetric: update the documentation of complexity metrics for Ada 2012. 2013-02-06 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Make_Secondary_DT): Code cleanup: remove useless initialization. 2013-02-06 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Build_Discriminant_Constraints): Do not generate overflow checks on a discriminant expression if the discriminant constraint is applied to a private type that has a full view, because the check will be applied when the full view is elaborated. Removing the redundant check is not just an optimization, but it prevents spurious assembler errors, because of the way the backend generates names for expressions that require overflow checking. 2013-02-06 Pascal Obry <obry@adacore.com> * s-osprim-mingw.adb: Removes workaround for an old GNU/Linker limitation on Windows. (DA): Removed. (LIA): Removed. (LLIA): Removed. (TFA): Removed. (BTA): Removed. (BMTA): Removed. (BCA): Removed. (BMCA): Removed. (BTiA): Removed. (Clock): Use variable corresponding to access. (Get_Base_Time): Likewise. (Monotonic_Clock): Likewise. 2013-02-06 Vincent Celier <celier@adacore.com> * make.adb (Gnatmake): When gnatmake is called with a project file, do not invoke gnatbind with -I-. * makeutl.adb (Create_Binder_Mapping_File): Rewrite function. Get the infos from all the sources. 2013-02-06 Ed Schonberg <schonberg@adacore.com> * snames.ads-tmpl: Add Name_Overriding_Renamings and pragma Overriding_Renamings. * par-prag.adb: Recognize pragma Overriding_Renamings. * opt.ads (Overriding_Renamings): flag to control compatibility mode with Rational compiler, replaces Rational_Profile flag. * sem_ch8.adb (Analyze_Subprogram_Renaming): When Overriding_Renamings is enabled, accept renaming declarations where the new subprogram renames and overrides a locally inherited operation. Improve error message for some illegal renamings. * sem_prag.adb (Analyze_Pragma): Add case for Overriding_Renamings. (Set_Rational_Profile): The Rational_Profile enables Overriding_Renamings, Implicit_Packing, and Use_Vads_Size. 2013-02-06 Ed Schonberg <schonberg@adacore.com> * sem_util.adb: Set parent of copied aggregate component, to prevent infinite loop. From-SVN: r195798
2012-11-06[multiple changes]Arnaud Charlet1-0/+1
2012-11-06 Tristan Gingold <gingold@adacore.com> * sem_ch9.adb (Analyze_Protected_Type_Declaration): Fix thinko in previous commit. 2012-11-06 Jose Ruiz <ruiz@adacore.com> * ali.adb (Scan_ALI): Fix parsing mechanism for -fstack-check. 2012-11-06 Thomas Quinot <quinot@adacore.com> * atree.adb, atree.ads, einfo.adb, errout.adb, errout.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads, err_vars.ads, expander.adb, exp_ch13.adb, exp_ch2.adb, exp_ch6.adb, exp_dist.adb, fe.h, fmap.adb, fmap.ads, gprep.adb, makeutl.adb, osint.adb, osint.ads, par_sco.adb, prepcomp.adb, prj-part.adb, prj-proc.adb, scng.adb, sdefault.ads, sem_ch10.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_dim.adb, sem_elab.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_type.adb, sem_warn.adb, stylesw.adb, stylesw.ads, targparm.adb, targparm.ads (Cascaded_Error): Rename to more descriptive name 'Check_Error_Detected'. Add calls to Check_Error_Detected at places where semantic analysis is abandoned assuming a previously detected error. From-SVN: r193235
2012-10-02[multiple changes]Arnaud Charlet1-0/+31
2012-10-02 Vincent Pucci <pucci@adacore.com> * sem_attr.adb (Analyze_Attribute): Check dimension for attribute Old before it gets expanded. * sem_dim.adb (Analyze_Dimension_Has_Etype): Correctly propagate dimensions for identifier. 2012-10-02 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop): Handle properly the case where the iterator type is derived locally from an instantiation of Ada.Iterators_Interface. * exp_ch7.adb (Establish_Transient_Scope): Do not create a transient scope if within the expansion of an iterator loop, because a transient block already exists. 2012-10-02 Vincent Celier <celier@adacore.com> * gnatcmd.adb: Use absolute path for configuration pragmas files * make.adb (Configuration_Pragmas_Switch.Absolute_Path): Moved to Makeutl. * makeutl.ads, makeutl.adb (Absolute_Path): New function, moved from make.adb. 2012-10-02 Vincent Celier <celier@adacore.com> * prj-part.adb (Post_Parse_Context_Clause): Resurrect Boolean parameter In_Limited. Check for circularity also if In_Limited is True. (Parse_Single_Project): Call Post_Parse_Context_Clause with In_Limited parameter. From-SVN: r191961
2012-07-30[multiple changes]Arnaud Charlet1-103/+103
2012-07-30 Robert Dewar <dewar@adacore.com> * bindusg.adb: Clarify file in -A lines. 2012-07-30 Robert Dewar <dewar@adacore.com> * freeze.adb: Minor reformatting. 2012-07-30 Robert Dewar <dewar@adacore.com> * gnatcmd.adb, makeutl.adb, makeutl.ads: Minor code reorganization. 2012-07-30 Vincent Pucci <pucci@adacore.com> * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Minor reformatting. * sem_ch9.adb (Allows_Lock_Free_Implementation): Minor reformatting. Capture the correct error message in case of a quantified expression. 2012-07-30 Thomas Quinot <quinot@adacore.com> * g-socket.adb (Get_Socket_Option, Set_Socket_Option): On Windows, the value is a milliseconds count in a DWORD, not a struct timeval. From-SVN: r189979
2012-07-30[multiple changes]Arnaud Charlet1-13/+17
2012-07-30 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch12.adb (Earlier): Add local variables T1 and T2. Minor code refactoring. 2012-07-30 Thomas Quinot <quinot@adacore.com> * gnatcmd.adb, make.adb, makeutl.adb, makeutl.ads (Test_If_Relative_Path): Rename to Ensure_Absolute_Path to better reflect what this subprogram does. Rename argument Including_L_Switch to For_Gnatbind, and also exempt -A from rewriting. * bindusg.adb: Document optional =file argument to gnatbind -A. 2012-07-30 Ed Schonberg <schonberg@adacore.com> * freeze.adb (Freeze_Entity): Do no apply restriction check on storage pools to access to subprogram types. From-SVN: r189978
2012-02-22[multiple changes]Arnaud Charlet1-6/+11
2012-02-22 Pascal Obry <obry@adacore.com> * s-taprop-mingw.adb (Finalize_TCB): Do not wait on thread handle as this is our own thread. 2012-02-22 Sergey Rybin <rybin@adacore.com frybin> * tree_io.ads: Update ASIS_Version_Number because of the changes in Snames. 2012-02-22 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Create_Finalizer): Suppress elaboration checks on stack-related finalizers. 2012-02-22 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Expression_Function): If the construct is a completion, indicate that its formals are the formals of a completion, and as such do not get a cross- reference entry. (Analyze_Subprogram_Specification): Do not generate a definition for the entity of an expression function, because it may be a completion. Definition will be generated if needed when analyzing the generated subprogram declaration. 2012-02-22 Vincent Celier <celier@adacore.com> * make.adb (Check): When checking if an object file is in the correct object directory, get the unit name from a previous call to Check_Source_Info_In_ALI. * makeutl.adb (Check_Source_Info_In_ALI): Return the name of the unit when everything is OK, otherwise return No_Name. * makeutl.ads (Check_Source_Info_In_ALI): Return Name_Id instead of Boolean 2012-02-22 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): In an instance, the operator is visible if an operand is of some numeric type which is not in use or directly visible, and the other operand is a numeric literal. 2012-02-22 Tristan Gingold <gingold@adacore.com> * init.c: Minor code clean up. * gcc-interface/Make-lang.in: Update dependencies. 2012-02-22 Arnaud Charlet <charlet@adacore.com> * gnatlink.adb (Gnatlink): Use -gnatcC in CodePeer_Node, otherwise GCC will generate an object file. 2012-02-22 Vincent Celier <celier@adacore.com> * projects.texi: Correct typo related to "**" in Source_Dirs. From-SVN: r184477
2012-01-30[multiple changes]Arnaud Charlet1-20/+14
2012-01-30 Vincent Pucci <pucci@adacore.com> * sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Minor code clean up. * s-diflio.ads: Minor change. 2012-01-30 Javier Miranda <miranda@adacore.com> * exp_ch9.adb (Build_Dispatching_Requeue): Add missing call to Get_Entry_Index. Required to generate code which provides the correct value of Entry_Index in the target entry. 2012-01-30 Nicolas Roche <roche@adacore.com> * system-vxworks-ppc.ads: Add pragma Linker_Options -crtbe to fix issue with zcx on VxWorks5. 2012-01-30 Pascal Obry <obry@adacore.com> * prj.ads, prj.adb (For_Every_Project_Imported): Remove In_Aggregate_Lib. (For_Every_Project_Imported_Context): New generic routine with a context parameter. * prj-nmsc.adb: Revert to use For_Every_Project_Imported Avoid distributed complexity. * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Ditto. From-SVN: r183702
2011-12-23[multiple changes]Arnaud Charlet1-13/+20
2011-12-23 Pascal Obry <obry@adacore.com> * prj.ads (For_Every_Project_Imported): Add In_Aggregate_Lib parameter to generic formal procedure. * prj.adb (For_Every_Project_Imported): Update accordingly. (Recursive_Check): Likewise. Do not parse imported project for aggregate library. This is needed as the imported projects are there just to handle dependencies. (Look_For_Sources): Likewise. (Recursive_Add): Likewise. * prj-env.adb, prj-conf.adb, makeutl.adb, gnatcmd.adb: Add In_Aggregate_Lib parameter to routines used with For_Every_Project_Imported generic procedure. * prj-nmsc.adb (Tree_Processing_Data): Add In_Aggregate_Lib field. (Check): Move where it is used. Fix implementation to not check libraries that are inside aggregate libraries. (Recursive_Check): Add In_Aggregate_Lib parameter. 2011-12-23 Ed Schonberg <schonberg@adacore.com> * sem_ch7.adb (Analyze_Package_Body, Has_Referencer): A generic package is a referencer regardless of whether there is a subsequent subprogram with an Inline pragma. 2011-12-23 Geert Bosch <bosch@adacore.com> * sem_ch3.adb (Can_Derive_From): Check matching Float_Rep on VMS. From-SVN: r182656
2011-12-21[multiple changes]Arnaud Charlet1-25/+44
2011-12-21 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Report_No_Sources): Remove argument Lang. Report no sources even for languages that are not allowed. (Add_Source): Get the source even when the language is not allowed. 2011-12-21 Robert Dewar <dewar@adacore.com> * sem_ch6.adb (Process_Formals): Add defensive code. 2011-12-21 Ed Schonberg <schonberg@adacore.com> * sem_ch7.adb, sem_ch13.adb (Analyze_Package_Specification): Build the invariant procedure of a type declaration that is a completion and has aspect specifications. (Build_Invariant_Procedure): If the procedure is built for a type declaration that is a completion, analyze body expliitly because all private declarations have been already analyzed. 2011-12-21 Claire Dross <dross@adacore.com> * a-cfdlli.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb, a-cofove.adb: Minor reformating on formal containers 2011-12-21 Vincent Celier <celier@adacore.com> * makeutl.adb (Mains.Complete_Mains.Do_Complete): Remove any main that is not in the list of restricted languages. (Insert_Project_Sources.Do_Insert): Only add sources of languages in the list of restricted languages. 2011-12-21 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Valid_Conversion): A type conversion is valid when the target type is an anonymous access type and the operand is a rewriting of an allocator. The conversion is typically inserted when the designated type is an interface. 2011-12-21 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Establish_Task_Master): If the enclosing block has no declarations, create new declarative list for it. 2011-12-21 Matthew Heaney <heaney@adacore.com> * a-rbtgbk.adb (Generic_Conditional_Insert): Fixed incorrect comment. From-SVN: r182586
2011-12-21[multiple changes]Arnaud Charlet1-1/+1
2011-12-21 Pascal Obry <obry@adacore.com> * prj-attr.adb, snames.ads-tmpl: Add Library_Standalone, Library_Fully_Standalone_Options and Library_Fully_Standalone_Supported attributes. * prj-nmsc.adb (Check_Library): Update check to take into account fully standalone libraries. Such shared libraries can only depend on static libraries. (Check_Stand_Alone_Library): Add support for fully standalone libraries. (Process_Project_Level_Simple_Attributes): Store value for configuration attribute Library_Fully_Standalone_Supported. * prj.ads, makeutl.adb (Standalone): New enumeration type. (Project_Data): Standalone_Library now of type Standlone. (Project_Configuration): Add Lib_Fully_Standalone_Supported field. (Default_Project_Config): Initialize new Lib_Fully_Standalone_Supported field. * clean.adb (Clean_Project): Adjust to new type for Standalone. * make.adb (Library_Phase): Adjust to new type for Standalone. (Gnatmake): Likewise. * mlib-prj.adb (Build_Library): Adjust to new type for Standalone. 2011-12-21 Thomas Quinot <quinot@adacore.com> * gnatls.adb (Gnatls): Call Set_Standard_Error at startup, and then Set_Standard_Output just before producing normal (non-diagnostic) output. * gnatcmd.adb (Gnatcmd): Call Set_Standard_Error at initialization (and again after parsing project files). 2011-12-21 Vincent Celier <celier@adacore.com> * prj-conf.adb (Do_Autoconf): When the object directory does not exist, create auto.cgpr in the directory where temporary files are created. From-SVN: r182573
2011-09-02[multiple changes]Arnaud Charlet1-74/+87
2011-09-02 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Iterator_Specification): If the domain of iteration is an expression, its value must be captured in a renaming declaration, so that modification of the elements is propagated to the original container. 2011-09-02 Pascal Obry <obry@adacore.com> * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb, prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb, prj-tree.adb: Minor reformatting and style fixes. From-SVN: r178443
2011-08-29[multiple changes]Arnaud Charlet1-5/+9
2011-08-29 Gary Dismukes <dismukes@adacore.com> * sem_type.adb: Minor reformatting. 2011-08-29 Robert Dewar <dewar@adacore.com> * makeutl.adb: Minor reformatting. 2011-08-29 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a function call of a limited type, the expansion of the renaming is complicated by the presence of various temporaries and subtypes that capture constraints of the renamed object. Rewrite node as an object declaration, whose expansion is simpler. Given that the object is limited there is no copy involved and no performance hit. From-SVN: r178187
2011-08-29[multiple changes]Arnaud Charlet1-1/+6
2011-08-29 Robert Dewar <dewar@adacore.com> * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb, freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting. 2011-08-29 Tristan Gingold <gingold@adacore.com> * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads, system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads, system-linux-hppa.ads, system-linux-s390.ads, system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads, system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads, system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads, system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads, system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads, system-solaris-sparc.ads, system-lynxos-x86.ads, system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads, system-solaris-x86_64.ads, system-mingw-x86_64.ads, system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads, system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads, system-vxworks-x86.ads: Remove GCC_ZCX_Support * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto. * opt.ads: Adjust comment. * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target. * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target. * system.ads: Move GCC_ZCX_Support to obsolete entries. 2011-08-29 Emmanuel Briot <briot@adacore.com> * makeutl.adb (Do_Complete): Resolve symbolic links when a relative file name is specified on the gnatmake or gprbuild command line, and before we search for that file in the project. 2011-08-29 Ed Schonberg <schonberg@adacore.com> * sem_type.adb (Within_Instance): New predicate in Collect_Interps, used to determine whether a possible interpretation for an overloadable entity is declared within the current instantiation and should be included in the candidate set. 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com> * gnat_rm.texi, gnat_ugn.texi: Clean ups. From-SVN: r178186
2011-08-29exp_ch9.adb, [...]: Minor reformatting.Robert Dewar1-2/+2
2011-08-29 Robert Dewar <dewar@adacore.com> * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb, makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl, snames.ads-tmpl: Minor reformatting. From-SVN: r178179
2011-08-29[multiple changes]Arnaud Charlet1-2/+142
2011-08-29 Thomas Quinot <quinot@adacore.com> * get_scos.adb: When reading a P statement SCO without a pragma name (from an older ALI file), ensure that the Pragma_Name component is set to Unknown_Pragma (not left uninitialized). 2011-08-29 Vincent Celier <celier@adacore.com> * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and modified to compute correctly the object path of a SAL project that is extending another library project. (Write_Path_File): New procedure. * makeutl.ads (Directories): New table moved from Buildgpr (Get_Directories): New procedure moved from Buildgpr (Write_Path_File): New procedure * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the paths before binding SALs, instead of Set_Ada_Paths. * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package Prj. * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env (Current_Source_Path_File_Of): New function (Set_Current_Object_Path_File_Of): New procedure (Current_Source_Object_File_Of): New function (Set_Current_Object_Path_File_Of): New procedure * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env (Current_Source_Path_File_Of): New function (Set_Current_Object_Path_File_Of): New procedure (Current_Source_Object_File_Of): New function (Set_Current_Object_Path_File_Of): New procedure 2011-08-29 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a packed entity, use a bit-field assignment only if there is no change of representation. From-SVN: r178177
2011-08-04[multiple changes]Arnaud Charlet1-2/+2
2011-08-04 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb, lib-xref-alfa.adb: Minor reformatting. 2011-08-04 Marc Sango <sango@adacore.com> * sem_ch12.adb (Analyze_Generic_Package_Declaration, Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation): Check absence of generic in SPARK mode. 2011-08-04 Tristan Gingold <gingold@adacore.com> * bindgen.adb (Gen_Adainit_C): Remove. (Gen_Adafinal_C): Ditto. (Gen_Elab_Externals_C): Ditto. (Gen_Elab_Calls_C): Ditto. (Gen_Elab_Order_C): Ditto. (Gen_Elab_Defs_C): Ditto. (Gen_Finalize_Library_C): Ditto. (Gen_Finalize_Library_Defs_C): Ditto. (Gen_Main_C): Ditto. (Gen_Output_File_C): Ditto. (Gen_Restrictions_C): Ditto. (Gen_Versions_C): Ditto. (Write_Info_Ada_C): Ditto. (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C (Gen_Output_File): Do not force Ada_Bind_File anymore. Always call Gen_Output_File_Ada. * gnatlink.adb (Begin_Info): Now a constant. (End_Info): Ditto. (Ada_Bind_File): Remove (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases. * switch-b.adb (Scan_Binder_Switches): Do not handle -C. * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases. * opt.ads (Ada_Bind_File): Remove. 2011-08-04 Thomas Quinot <quinot@adacore.com> * projects.texi: Document target-specific directory in default project path for gnatmake. 2011-08-04 Thomas Quinot <quinot@adacore.com> * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project path in all cases . From-SVN: r177395
2011-08-04[multiple changes]Arnaud Charlet1-9/+22
2011-08-04 Yannick Moy <moy@adacore.com> * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure (Analyze_Pragma): allow static string expression for name of Test_Case, instead of simply string literals. * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string expressions. 2011-08-04 Vincent Celier <celier@adacore.com> * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical case suffixes to find truncated main sources. 2011-08-04 Tristan Gingold <gingold@adacore.com> * impunit.adb (Non_Imp_File_Names_95): Add g-tastus. s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put. (Compute_Current_Task): Ditto. 2011-08-04 Tristan Gingold <gingold@adacore.com> * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage. 2011-08-04 Yannick Moy <moy@adacore.com> * lib-xref-alfa.adb (Is_Global_Constant): new function that detects library-level constant. (Add_ALFA_Xrefs): ignore global constants in ALFA xref. * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal used as selector of parameter association, in ALFA mode. From-SVN: r177389
2011-08-04make.adb, [...] (Check_Mains): rebuild the list of files on the command line ↵Emmanuel Briot1-0/+1
after processing it through... 2011-08-04 Emmanuel Briot <briot@adacore.com> * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild the list of files on the command line after processing it through Complete_Mains. From-SVN: r177380
2011-08-04[multiple changes]Arnaud Charlet1-65/+48
2011-08-04 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Build_Raise_Statement): Remove the specialized processing for .NET/JVM. These targets can now benefit from Raise_From_Controlled_Operation and they share the same processing with standard targets. (Establish_Transient_Scope): Remove the restriction for .NET/JVM. These targets need transient scopes in order to properly finalize short lived controlled objects. (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for NET/JVM. These targets can now benefit from Raise_From_Controlled_Operation and they share the same processing with standard targets. 2011-08-04 Geert Bosch <bosch@adacore.com> * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack 2011-08-04 Ed Schonberg <schonberg@adacore.com> * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to Expand_Record_Aggregate, to determine whether aggregate must be expanded into assignments. This is the case if the ancestor part is private, regarless of the setting of the flag Has_Private_Ancestor. 2011-08-04 Ed Falis <falis@adacore.com> * vxaddr2line.adb: Add support for e500v2 and for Linux hosts 2011-08-04 Bob Duff <duff@adacore.com> * sinfo.ads: Fix comment. 2011-08-04 Steve Baird <baird@adacore.com> * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then choose a package name in much the same way as is done for JGNAT when VM_Target /= No_VM, except that a slightly more distinctive prefix string is used. 2011-08-04 Emmanuel Briot <briot@adacore.com> * makeutl.adb (Complete_Mains): no longer accept unit names on the gnatmake command line. This behavior was never documented (and was supported only because of an early bug in the code). This case might lead to ambiguous cases (between unit names and truncated base names without suffixes). From-SVN: r177379
2011-08-04makeutl.adb (Compute_Builder_Switches): no longer accept a unit name as an ↵Emmanuel Briot1-17/+2
index for Builder'Switches. 2011-08-04 Emmanuel Briot <briot@adacore.com> * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name as an index for Builder'Switches. This conforms to the documentation. * make.adb (Insert_Project_Sources): avoid duplicate code From-SVN: r177375
2011-08-04[multiple changes]Arnaud Charlet1-1/+3
2011-08-04 Emmanuel Briot <briot@adacore.com> * makeutl.adb (Complete_Mains): if the user has passed a relative file name on the command line (for instance "../dummy"), never assume it can be a unit name. 2011-08-04 Tristan Gingold <gingold@adacore.com> * bindgen.adb: Remove code the reference or create the Break_Start/__gnat_break_start procedure. * s-stalib.adb (Break_Start): Removed. From-SVN: r177374
2011-08-04make.adb, [...] (Compute_Builder_Switches): now shared with gprbuild.Emmanuel Briot1-0/+330
2011-08-04 Emmanuel Briot <briot@adacore.com> * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now shared with gprbuild. From-SVN: r177372
2011-08-04prj.adb, [...] (Complete_Mains): search for the sources in the project and ↵Emmanuel Briot1-1/+2
its imported projects... 2011-08-04 Emmanuel Briot <briot@adacore.com> * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the sources in the project and its imported projects, but not in the whole tree. From-SVN: r177370