summaryrefslogtreecommitdiff
path: root/gcc/ada
Commit message (Collapse)AuthorAgeFilesLines
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-1022-112/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sinput.adb (Check_For_BOM): Avoid reading past end of file. 2013-09-10 Robert Dewar <dewar@adacore.com> * errout.adb (Error_Msg_Ada_2012_Feature): New procedure. * errout.ads (Error_Msg_Ada_2012_Feature): New procedure. * inline.ads: Save/Restore Ada_Version_Pragma. * opt.adb: Save/Restore Ada_Version_Pragma. * opt.ads (Ada_Version_Pragma): New variable. * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature. * prj.adb: Initialize Ada_Version_Pragma. * sem_attr.adb: Use Error_Msg_Ada_2012_Feature. * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma. * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma. * switch-c.adb: Initialize Ada_Version_Pragma. * sem_ch12.adb: Minor reformatting. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Process_Subtype): Discard constraint on access to class-wide type. Such constraints are not supported and are considered a language pathology. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202466 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-107-15/+50
| | | | | | | | | | | | | | | * gnatbind.adb: Correct starting date in --version string. * gnatdll.adb: Use Check_Version_And_Help_G to implement --help and --version. * gnatkr.adb: Use Check_Version_And_Help_G to implement --help and --version. * gnatlink.adb: Correct starting date in --version string. * gnatls.adb: Correct starting date in --version string. * make.adb: Correct starting date in --version string. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202465 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-104-4/+66
| | | | | | | | | | * switch-c.adb: Minor reformatting. * atree.ads (Original_Nodes): Add documentation on ASIS usage. * sinfo.ads: Add section on ASIS mode (documentation only). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202464 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-103-3/+32
| | | | | | | | | | | | | | * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow REASON parameter in compiler units (bootstrap issues). 2013-09-10 Robert Dewar <dewar@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Output warning if -gnateE specified for a target that does not support it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202463 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Ed Schonberg <schonberg@adacore.com>charlet2013-09-108-35/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly a subprogram body without previous spec. 2013-09-10 Gary Dismukes <dismukes@adacore.com> * sem_ch4.adb: Minor typo fixes. 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com> * aspects.adb (Aspects_On_Body_OK): New routine. * aspects.ads: Modify type Aspect_Expression to include the Optional_XXX variants. Update the contents of table Aspect_Argument. Add table Aspect_On_Body_OK. (Aspects_On_Body_OK): New routine. * par-ch13.adb (Get_Aspect_Specifications): Account for optional names and expressions when parsing an aspect. * sem_ch6.adb: Add with and use clause for Aspects. (Analyze_Subprogram_Body_Helper): Do not emit an error when analyzing a body with aspects that can be applied simultaneously to both spec and body. * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the corresponding pragma of an aspect that applies to a subprogram body in the declarative part. (Make_Aitem_Pragma): Do not generate a pragma with an empty argument list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202462 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-1013-19/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * switch-c.adb: Diagnose -gnatc given after -gnatRm. * gnat_ugn.texi: Add documentation for -gnatRm. * usage.adb: Minor reorganization (put style entries in proper order) Document -gnatRm switch. * sinfo.ads: Minor comment fix. 2013-09-10 Sergey Rybin <rybin@adacore.com frybin> * tree_io.ads: Update ASIS_Version_Number. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Access_Subprogram_Declaration): Check whether the designated type can appear in a parameterless call. * sem_ch4.adb (Analyze_Call): Do not insert an explicit dereference in the case of an indirect call through an access function that returns an array type. (Analyze_One_Call): Handle properly legal parameterless calls whose result is indexed, in constructs of the for F.all (I) * sem_ch6.ads (May_Need_Actuals): Make public, for use on access to subprogram types. * sem_res.adb (Resolve_Call): If the call is indirect, there is no entity to set on the name in the call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202461 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-09-1019-93/+556
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aspects.adb: Add entries in the Has_Aspect_Specifications_Flag table for package body and body stubs. (Move_Or_Merge_Aspects): New routine. (Remove_Aspects): New routine. * aspects.ads (Move_Aspects): Update comment on usage. (Move_Or_Merge_Aspects): New routine. (Remove_Aspects): New routine. * par-ch3.adb: Update the grammar of private_type_declaration, private_extension_declaration, object_renaming_declaration, and exception_renaming_declaration. (P_Subprogram): Parse the aspect specifications that apply to a body stub. * par-ch6.adb: Update the grammar of subprogram_body_stub and generic_instantiation. * par-ch7.adb: Update the grammar of package_declaration, package_specification, package_body, package_renaming_declaration, package_body_stub. (P_Package): Parse the aspect specifications that apply to a body, a body stub and package renaming. * par-ch9.adb: Update the grammar of entry_declaration, protected_body, protected_body_stub, task_body, and task_body_stub. (P_Protected): Add local variable Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect specifications that apply to a protected body and a protected body stub. (P_Task): Add local variable Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect specifications that apply to a task body and a task body stub. * par-ch12.adb: Update the grammar of generic_renaming_declaration. (P_Generic): Parse the aspect specifications that apply to a generic renaming. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit an error when analyzing aspects that apply to a body stub. Such aspects are relocated to the proper body. * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect specifications that apply to a body. * sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined aspects not being supported on protected bodies. Remove the aspect specifications. (Analyze_Single_Protected_Declaration): Analyze the aspects that apply to a single protected declaration. (Analyze_Task_Body): Warn about user-defined aspects not being supported on task bodies. Remove the aspect specifications. * sem_ch10.adb: Add with and use clause for Aspects. (Analyze_Package_Body_Stub): Propagate the aspect specifications from the stub to the proper body. * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the corresponding pragma of an aspect that applies to a body in the declarations of the body. * sinfo.ads: Update the gramma of expression_function, private_type_declaration, private_extension_declaration, object_renaming_declaration, exception_renaming_declaration, package_renaming_declaration, subprogram_renaming_declaration, generic_renaming_declaration, entry_declaration, subprogram_body_stub, package_body_stub, task_body_stub, generic_subprogram_declaration. 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Pragma): Add processing for aspect/pragma SPARK_Mode when it applies to a [library-level] subprogram or package [body]. 2013-09-10 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Document that -gnatc and -gnatR cannot be given together. * switch-c.adb (Scan_Front_End_Switches): Give error if both -gnatR and -gnatc given. 2013-09-10 Robert Dewar <dewar@adacore.com> * g-table.ads, g-table.adb (For_Each): New generic procedure (Sort_Table): New generic procedure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202460 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Thomas Quinot <quinot@adacore.com>charlet2013-09-106-14/+31
| | | | | | | | | | | | | | | | | | | * adaint.c (__gnat_is_executable_file_attr): Should be true for an executable regular file only only (not for a directory that has the executable permission). 2013-09-10 Ed Schonberg <schonberg@adacore.com> * sem_res.adb: Further work on operator calls in ASIS. 2013-09-10 Yannick Moy <moy@adacore.com> * sinfo.ads, sem_prag.ads, sem_ch13.adb: Minor correction and comment update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202459 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Thomas Quinot <quinot@adacore.com>charlet2013-09-104-8/+19
| | | | | | | | | | * aspects.ads, sem_ch13.adb: Minor reformatting. * adaint.c (__gnat_set_close_on_exec): Add comment documenting that this routine is shared between OS_Lib and Sockets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202458 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-107-58/+159
| | | | | | | | | | | | | | | | * exp_prag.adb (Expand_Pragma_Check): Ignore pragma if Is_Ignored set. * sem_ch13.adb (Make_Aitem_Pragma): Set Is_Checked if needed. * sem_prag.adb (Check_Kind): Moved from spec (Analyze_Pragma): Make sure Is_Ignored/Is_Checked are set right (Analyze_Pragma, case Check): Ditto (Check_Applicable_Policy): Handle Statement_Assertion case Throughout, set and check the Is_Checked flag as appropriate. * sem_prag.ads (Check_Kind): Moved to body. * sinfo.ads, sinfo.adb (Is_Checked): New flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202457 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-1010-151/+655
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aspects.ads (Delay_Type): New type (Aspect_Delay): New table. * einfo.adb (Has_Delayed_Rep_Aspects): New flag (May_Inherit_Delayed_Rep_Aspects): New flag (Rep_Clause): Removed (use Get_Attribute_Representation_Clause). * einfo.ads (Has_Delayed_Rep_Aspects): New flag (May_Inherit_Delayed_Rep_Aspects): New flag * freeze.adb: Minor reformatting * sem_ch13.adb (Analyze_Aspect_Speficifications): Redo handling of delayed evaluation, including optimizing some cases and avoiding delays. (Analyze_Aspects_At_Freeze_Point): Now handled inheriting delayed rep aspects for type derivation case. (Inherit_Delayed_Rep_Aspects): New procedure * sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Now handled inheriting delayed rep aspects for type derivation case. * sem_ch3.adb (Build_Derived_Type): Set May_Inherit_Derived_Rep_Aspects if parent type flag Has_Delayed_Rep_Aspects is set 2013-09-10 Robert Dewar <dewar@adacore.com> * errout.adb (Finalize): Don't delete real errors with specific warning control. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Expand_N_Timed_Entry_Call, Expand_N_Conditional_Entry_Call, Expand_N_Asynchronous_Select): Handle properly a trigger that is a call to a primitive operation of a type that implements a limited interface, if the type itself is not limited. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202456 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-109-37/+56
| | | | | | | | | * sem_ch3.adb, sinfo.ads, exp_ch9.adb, sem_prag.adb, sem_ch12.adb, exp_ch4.adb, sprint.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202455 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Yannick Moy <moy@adacore.com>charlet2013-09-105-24/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sinfo.ads: Document splitting of pre/post in N_Contract description. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_Op_Multiply): If the operation is of the form X * 2 ** N and it has been marked Is_Power_Of_2_For_Shift, add a mod operation if the result type is a binary modular type. 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Add local variable Context. Remove local variable Subp_Id. Start the context traversal from the current subprogram rather than the current scope. Update the scope traversal and error reporting. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Expand_N_Timed_Entry_Call): New procedure Rewrite_Triggering_Statements, to encapsulate the statements that follow the trigger of the entry call. This procedure is needed when the trigger is a dispatching call, because the expansion requires several copies of those statements. The procedure is more efficient, and preserves non-local references when the construct is within an instance. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202454 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Ed Schonberg <schonberg@adacore.com>charlet2013-09-105-13/+83
| | | | | | | | | | | | | | | | | | * sem_ch12.adb (Analyze_Package_Instantiation): If the instantiation is a compilation unit, analyze aspects before analyzing the package declaration for the instance. * sem_ch13.adb (Analyze_Aspect_Specifications): If the corresponding node is a package instantiation, insert generated pragmas at the head of visible declarations. * sem_prag.adb (Analyze_Pragma, case Preelaborate): In an instance do not ignore the pragma if it comes from an aspect specification in the instance, and not from the generic unit. * sprint.adb (Sprint_Node_Actual): For a package declaration that is an instantiation, print aspects after declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202453 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Robert Dewar <dewar@adacore.com>charlet2013-09-104-16/+19
| | | | | | | | * einfo.adb, sem_prag.adb, rtsfind.ads: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202452 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-09-104-24/+105
| | | | | | | | | | | | | | | | | | | | | | * sem_prag.adb (Get_SPARK_Mode_Id): Handle the case where the pragma may appear without an argument. (Analyze_Global_List): Add expanded_name to the list of constructs that denote a single item. (Collect_Global_List): Add expanded_name to the list of constructs that denote a single item. 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Apply_Accessibility_Check): Add local constant Pool_Id and local variables Fin_Call and Free_Stmt. Finalize and deallocate a heap-allocated class-wide object after it has been determined that it violates the accessibility rules. * rtsfind.ads: Add new RTU_Id for System.Memory. Add new RE_Id and entry in RE_Unit_Table for RE_Free. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202451 138bc75d-0d04-0410-961f-82ee72b054a4
* PR ada/58239ebotcazou2013-09-013-3/+22
| | | | | | | | | | | | | | | | gnattools/ * Makefile.in (CXX_LFLAGS): New. (TOOLS_FLAGS_TO_PASS_NATIVE): Pass CXX and CXX_LFLAGS. (TOOLS_FLAGS_TO_PASS_RE): Likewise. (TOOLS_FLAGS_TO_PASS_CROSS): Pass CXX. gcc/ada/ * gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++. (GCC_LINK): Use CXX instead of CC. * gcc-interface/Make-lang.in (CXX_LFLAGS): New. (ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202150 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about aliasebotcazou2013-08-132-1/+6
| | | | | | | sets of derived types in ASIS mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201705 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/decl.c (gnat_to_gnu_entity): Replace True with true.ebotcazou2013-08-135-19/+33
| | | | | | | | | | | | | | | | (is_cplusplus_method): Likewise, and False with false. (components_need_strict_alignment): Likewise. * gcc-interface/misc.c (gnat_init_gcc_fp): Likewise. * gcc-interface/trans.c (Loop_Statement_to_gnu): Likewise. (Handled_Sequence_Of_Statements_to_gnu): Likewise. (add_cleanup): Likewise. (Sloc_to_locus1): Likewise. (Sloc_to_locus): Likewise. (set_expr_location_from_node): Likewise. * gcc-interface/utils.c (potential_alignment_gap): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201704 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/trans.c (set_end_locus_from_node): Clear column infoebotcazou2013-08-132-2/+11
| | | | | | | for the end_locus of a block if it does not come from an End_Label. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201703 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Ifebotcazou2013-08-134-16/+59
| | | | | | | | | | | | | | | there is no End_Label, attach cleanup actions to the sloc of the HSS node instead. (Exception_Handler_to_gnu_zcx): Associate cleanup actions with the sloc of the handler itself. (add_cleanup): Clear column information in sloc of cleanup actions. (Sloc_to_locus1): New static function. (Sloc_to_locus): Call it. (set_expr_location_from_node1): New static function. (set_expr_location_from_node): Call it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201702 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/trans.c (Call_to_gnu): Deal with specific conditionalebotcazou2013-08-132-2/+17
| | | | | | | expressions for misaligned actual parameters. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201700 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/trans.c (can_equal_min_or_max_val_p): Be prepared forebotcazou2013-08-132-1/+9
| | | | | | | values outside of the range of the type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201692 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/utils2.c (build_atomic_load): Do a mere view-conversionebotcazou2013-08-132-9/+31
| | | | | | | | | | to the original type before converting to the result type. (build_atomic_store): First do a conversion to the original type before view-converting to the effective type, but deal with a padded type specially. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201682 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/Makefile.in (TOOLS_LIBS): Pick C object files from theebotcazou2013-08-082-10/+19
| | | | | | | | | | | | compiler build and use standard library variables. (../../vxaddr2line$(exeext): Do not depend on targext.o and adjust. (gnatmake-re): Do not depend on targext.o. (gnatlink-re): Do not depend on link.o and targext.o. (../../gnatmake$(exeext): Likewise. (../../gnatlink$(exeext): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201602 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-21 Ondřej Bílka <neleai@seznam.cz>mrs2013-07-2110-16/+28
| | | | | | | | | | | | | | | * gcc-interface/gigi.h: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils2.c: Likewise. * gnat_rm.texi: Likewise. * gnat_ugn.texi: Likewise. * raise-gcc.c: Likewise. * sigtramp-ppcvxw.c: Likewise. * sysdep.c: Likewise. * terminals.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201111 138bc75d-0d04-0410-961f-82ee72b054a4
* PR ada/57934ebotcazou2013-07-202-2/+7
| | | | | | | * gcc-interface/ada.h (CAT): Fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201084 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-07-084-18/+103
| | | | | | | | | | | | | * einfo.adb (Get_Pragma): Handle the retrieval of delayed pragmas stored in N_Contract nodes. * einfo.ads (Get_Pragma): Update the comment on usage. * sem_prag.adb (Check_Precondition_Postcondition): Retain a copy of the pragma when it applies to a body that acts as a spec. The copy is preanalyzed and chained on the contract of the body. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200774 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Robert Dewar <dewar@adacore.com>charlet2013-07-084-10/+47
| | | | | | | | | | | | | | | | | | | | * rtsfind.adb: Minor comment fix. 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch4.adb (Check_Ghost_Subprogram_Call): Do not check the placement of a Ghost function call when the enclosing context is being preanalyzed. 2013-07-08 Ed Schonberg <schonberg@adacore.com> * exp_ch6.adb (Expand_Inlined_Call, Process_Formals): If the expression in a return statement is a numeric literal, qualify it with the return type for proper resolution. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200772 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Robert Dewar <dewar@adacore.com>charlet2013-07-0822-238/+608
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sem.ads: Minor comment updates. * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb: Minor reformatting. 2013-07-08 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry for Restriction_Set. * gnat_rm.texi: Add missing menu entry for Attribute Ref Add documentation for attribute Restriction_Set. * lib-writ.adb (Write_With_Lines): Generate special W lines for Restriction_Set. * lib-writ.ads: Document special use of W lines for Restriction_Set. * lib.ads (Restriction_Set_Dependences): New table. * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to list (Scan_Name_Extension_Apostrophe): Remove kludge test for Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence for Restricton_Set. * restrict.adb (Check_SPARK_Restriction): Put in Alfa order (OK_No_Dependence_Unit_Name): New function. * restrict.ads (OK_No_Dependence_Unit_Name): New function. * rtsfind.adb: Minor reformatting Minor code reorganization. * sem_attr.adb (Analyze_Attribute): Add processing for Restriction_Set. * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Remove Check_Unit_Name and use new function OK_No_Dependence_Unit_Name instead. * sinfo.ads: Minor comment updates. * snames.ads-tmpl: Add entry for Restriction_Set attribute. 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant Pool_Id and local variable Free_Stmt. Do not deallocate the faulty object as "free" is not available on all targets/profiles. 2013-07-08 Robert Dewar <dewar@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Storage_Size aspect for task type in case discriminant is referenced. (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size attribute definition clause as obsolescent if from aspect. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200771 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Robert Dewar <dewar@adacore.com>charlet2013-07-085-19/+30
| | | | | | | | | | | | | | * gnat_rm.texi: Add documentation for Img returning a function. * par-prag.adb: Minor reformatting. * restrict.adb: Minor reformatting and code reorganization. 2013-07-08 Ed Schonberg <schonberg@adacore.com> * sem_res.adb: add guard to ASIS transform. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200769 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Ed Schonberg <schonberg@adacore.com>charlet2013-07-085-45/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch9.adb (Expand_N_Asynchronous_Select): If the trigger of the asynchronous select is a dispatching call, transform the abortable part into a procedure, to avoid duplication of local loop variables that may appear within. 2013-07-08 Vincent Celier <celier@adacore.com> * projects.texi: Update the documentation of suffixes in package Naming. 2013-07-08 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Conforming_Types): Anonymous_access_to_subprograsm types are type conformant if the designated type of one is protected and the other is not. Convention only matters when checking subtype conformance. 2013-07-08 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, propagate back the fully resolved operands to the original function call so that all semantic information remains available to ASIS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200767 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Ed Schonberg <schonberg@adacore.com>charlet2013-07-084-7/+14
| | | | | | | | | | | | | * sem_ch4.adb: minor reformatting (remove obsolete comment). * sem_ch9.adb: improve error message on illegal trigger. 2013-07-08 Robert Dewar <dewar@adacore.com> * sem_prag.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200766 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Robert Dewar <dewar@adacore.com>charlet2013-07-0811-60/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnatcmd.adb: Minor reformatting. 2013-07-08 Robert Dewar <dewar@adacore.com> * targparm.adb (Get_Target_Parameters): Recognize pragma Partition_Elaboration_Policy. 2013-07-08 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Minor update to mention partition elaboration policy. 2013-07-08 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Comple_Object_Operation): Revert previous change. (Analyze_Indexed_Component_Form): In ASIS mode, if node has been transformed but not rewritten as a function call (as is the case in a generic), analyze it as such. 2013-07-08 Thomas Quinot <quinot@adacore.com> * gnat_rm.texi: Minor rewording: add missing word "operators" in documentation for restriction No_Direct_Boolean_Operator. 2013-07-08 Robert Dewar <dewar@adacore.com> * errout.adb (Set_Msg_Txt): No longer sets Is_Style_Msg, Is_Warning_Msg, or Is_Unconditional_Msg (all are set elsewhere now). * errout.ads: Insertions ! and !! no longer have to be at the end of the message, they can be anywhere in the message. * erroutc.adb (Test_Style_Warning_Serious_Unconditional_Msg): Replaces Test_Style_Warning_Serious_Msg * erroutc.ads (Has_Double_Exclam): New flag New comments for existing flags (Test_Style_Warning_Serious_Unconditional_Msg): Replaces Test_Style_Warning_Serious_Msg * errutil.adb (Test_Style_Warning_Serious_Unconditional_Msg): Replaces Test_Style_Warning_Serious_Msg git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200765 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Robert Dewar <dewar@adacore.com>charlet2013-07-0813-61/+82
| | | | | | | | | | | | | | | | | | | * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): Recognize SPARK_05 as synonym for SPARK in restrictions pragma. * restrict.ads, restrict.adb (SPARK_Hides): Table moved to body, only referenced there. * scng.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb, sem_res.adb, sem_util.adb: Use restriction SPARK_05 instead of SPARK. * snames.ads-tmpl (Name_No_Obsolescent_Features): New entry. 2013-07-08 Vincent Celier <celier@adacore.com> * gnatcmd.adb (Check_Files): Use a response file for gnatls when possible. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200764 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Gary Dismukes <dismukes@adacore.com>charlet2013-07-088-27/+97
| | | | | | | | | | | | | | | | | | | | | | * freeze.adb: Minor typo fixes. 2013-07-08 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Document SPARK_05 (replaces SPARK) Document obsolete recognition of SPARK Document all other obsolete synonyms for old restrictions. * restrict.adb (Check_SPARK_Restriction): SPARK_05 replaces SPARK (Process_Restriction_Synonyms): Handle SPARK as synonym for SPARK_05. * restrict.ads: Restriction SPARK_05 replaces SPARK. * s-rident.ads: Replace restriction SPARK by SPARK_05 Add SPARK as synonym for SPARK_05. * sem_prag.adb: Minor reformatting. * snames.ads-tmpl: Add entries for Name_SPARK and Name_SPARK_05. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200763 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Robert Dewar <dewar@adacore.com>charlet2013-07-084-72/+95
| | | | | | | | | | | * sem_dim.adb: Minor error message change. * freeze.adb (Freeze_Entity, array type case): Extend handling of Implicit_Packing to handle multi-dimensional array case. * gnat_rm.texi: Update doc on Implicit_Packing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200762 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Robert Dewar <dewar@adacore.com>charlet2013-07-083-2/+17
| | | | | | | | | | | | | | | | * exp_ch4.adb: Minor reformatting. 2013-07-08 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Complete_Object_Operation): In ASIS mode, if the parent node is a selected component and the analysis as a call is successful, set the type of the selector in the parent node for subsequent checks, because the rewriting of the node does not take place during pre-analysis. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200761 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Robert Dewar <dewar@adacore.com>charlet2013-07-084-22/+52
| | | | | | | | | | | | | | * sem_ch8.adb, exp_ch3.adb: Minor reformatting. 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Expand_N_Op_Eq): When comparing two Bounded_Strings, use the predefined equality function of the root Super_String type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200760 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-07-088-467/+435
| | | | | | | | | | | | | | | | | | | | | | | | | | * exp_ch4.adb (Create_Alternative): Removed. (Expand_N_If_Expression): Remove constant In_Case_Or_If_Expression. Add local variable Ptr_Typ. Inspect the "then" and "else" action lists for transient controlled objects and generate code to finalize them. (Is_Controlled_Function_Call): Removed. (Process_Action): Update the comment on usage. Update the call to Process_Transient_Object. There is no need to continue the traversal of the object itself. (Process_Actions): New routine. (Process_Transient_Object): Moved to the top level of Exp_Ch4. Add a new formal and update the related comment on usage. * exp_util.adb (Within_Case_Or_If_Expression): Start the search from the parent of the node. 2013-07-08 Robert Dewar <dewar@adacore.com> * a-cusyqu.ads, a-cbprqu.ads, s-interr.ads, a-cuprqu.ads, a-cbsyqu.ads: Minor reformatting (proper formatting of overriding). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200759 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Ed Schonberg <schonberg@adacore.com>charlet2013-07-084-48/+95
| | | | | | | | | | | | | | | | | | | * sem_ch8.adb (Attribute_Renaming): Treat 'Img as an attribute that can be renamed as a function. 2013-07-08 Thomas Quinot <quinot@adacore.com> * g-socket.ads: Document target dependency: FIONBIO may or may not be inherited from listening socket by accepted socket. 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Apply_Accessibility_Check): Do not deallocate the object on targets that can't deallocate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200758 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-07-083-3/+19
| | | | | | | | | | | | | | * exp_ch3.adb (Freeze_Type): Generate a subpools-related accessibility check only on profiles that include the corresponding library unit. 2013-07-08 Gary Dismukes <dismukes@adacore.com> * sem_ch8.adb: Minor typo fixes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200757 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Javier Miranda <miranda@adacore.com>charlet2013-07-085-13/+50
| | | | | | | | | | | | | | * sem_ch8.adb (Save_Scope_Stack): Adding documentation. (Restore_Scope_Stack): Remove the elements of the list when the visibility of each entity is restored. 2013-07-08 Robert Dewar <dewar@adacore.com> * exp_ch9.adb, sem.ads, sem_util.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200756 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Robert Dewar <dewar@adacore.com>charlet2013-07-083-6/+24
| | | | | | | | * sem_ch8.adb, sem_ch8.ads: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200755 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Gary Dismukes <dismukes@adacore.com>charlet2013-07-087-128/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | * gnat_rm.texi: Minor reformatting and rewording for consistency. 2013-07-08 Bob Duff <duff@adacore.com> * exp_ch3.adb (Build_Master): If Desig_Type is an incomplete view coming from a limited-with'ed package, use the nonlimited view in case it has tasks. 2013-07-08 Javier Miranda <miranda@adacore.com> * sem_ch8.ad[sb] (Save_Scope_Stack): Modified to return the list of entities which have been temporarily removed from immediate visibility. (Restore_Scope_Stack): Modified to receive an additional parameter with the list of entities whose immediate visibility must be restored. * sem.adb (Do_Analyze): Use new version of Save_Scope_Stack/Restore_Scope_Stack * sem_ch12.adb (Inline_Instance_Body): Use new version of Save_Scope_Stack and Restore_Scope_Stack git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200754 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-07-086-86/+48
| | | | | | | | | | | | | | | | * sem_prag.adb (Analyze_Pragma): Remove variable Unit_Prag. Remove the check on duplicate mode for the configuration form of the pragma. (Redefinition_Error): Removed. 2013-07-08 Robert Dewar <dewar@adacore.com> * lib.ads, gnat_rm.texi, einfo.ads, sem_ch13.adb: Minor reformatting and editing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200753 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-08 Ed Schonberg <schonberg@adacore.com>charlet2013-07-083-9/+18
| | | | | | | | | | | | | | * sem_prag.adb (Analyze_PPC_In_Decl_Part): In ASIS mode, pre-analyze only the original expression attached to the source aspect, not the relocated expression of the pragma, to prevent malformed trees in ASIS mode. * sem_ch13.adb (Analyze_Aspect_Specifications): Revert previous patch: the expression in the aspect for pre/post must be relocated to the pragma for proper analysis. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200752 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>charlet2013-07-0521-243/+958
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect. * aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id, Aspect_Argument, Aspect_Names. * atree.adb (Node32): New routine. (Set_Node32): New routine. * atree.ads (Node32): New routine. (Set_Node32): New routine. * einfo.adb: Node32 is now used as SPARK_Mode_Pragmas. (Set_SPARK_Mode_Pragmas): New routine. (SPARK_Mode_Pragmas): New routine. (Write_Field32_Name): Add and entry for SPARK_Modes. * einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage in various entities. (Set_SPARK_Mode_Pragmas): New routine and pragma Inline. (SPARK_Mode_Pragmas): New routine and pragma Inline. * gnat_rm.texi: Add sections explaining the syntax and semantics of aspect/pragma SPARK_Mode. * gnat_ugn.texi: Add pragma SPARK_Mode to the list of configuration pragmas. * lib.adb (Set_SPARK_Mode_Pragma): New routine. (SPARK_Mode_Pragma): New routine. * lib.ads: Alphabetize the comments on fields of record Unit_Record. Add new field SPARK_Mode_Pragma along with comment on its usage. Update the layout of record Unit_Record. (Set_SPARK_Mode_Pragma): New routine and pragma Inline. (SPARK_Mode_Pragma): New routine and pragma Inline. * lib-load.adb (Create_Dummy_Package_Unit): Initialize field SPARK_Mode_Pragma. (Load_Main_Source): Initialize field SPARK_Mode_Pragma. (Load_Unit): Initialize field SPARK_Mode_Pragma. * lib-writ.adb (Add_Preprocessing_Dependency): Initialize field SPARK_Mode_Pragma. (Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma. * opt.ads: Alphabetize verification flags. Store the compilation-wide SPARK mode in variable Global_SPARK_Mode. * par-prag.adb: Pragma SPARK_Mode does not need special processing by the parser. * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect SPARK_Mode into a pragma. (Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need delayed processing. * sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags. (Analyze_Pragma): Add processing for pragma SPARK_Mode. (Get_SPARK_Mode_Id): New routine. (Is_Elaboration_SPARK_Mode): New routine. (Is_Private_SPARK_Mode): New routine. * sem_prag.ads (Get_SPARK_Mode_Id): New routine. (Is_Elaboration_SPARK_Mode): New routine. (Is_Private_SPARK_Mode): New routine. * sinfo.ads: Update the comment on the usage of field Next_Pragma. * snames.ads-tmpl: Add new predefined name for SPARK_Mode and Auto. Add new pragma Id for SPARK_Mode. * types.ads: Add new type SPARK_Mode_Id. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200711 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-05 Ed Schonberg <schonberg@adacore.com>charlet2013-07-052-2/+12
| | | | | | | | | | | * sem_ch13.adb (Analyze_Aspect_Specifications): For pre/postconditions copy the expression to the generated pragma, to avoid sharing between the original aspect and the pragma node, because in ASIS_Mode both will be independently analyzed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200710 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-07-05 Ed Schonberg <schonberg@adacore.com>charlet2013-07-053-105/+241
| | | | | | | | | | | | | | * exp_ch3.adb (Build_Variant_Record_Equality): Add pairs of formals for each discriminant of an unchecked union. (Make_Eq_Case): Suprogram accepts a list of discriminants. Nested variants are supported. New helper function Corresponding_Formal. * exp_ch4.adb (Build_Equality_Call): For unchecked unions, loop through discriminants to create list of inferred values, and modify call to equality routine accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200709 138bc75d-0d04-0410-961f-82ee72b054a4