aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
AgeCommit message (Collapse)AuthorFilesLines
2013-01-02checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow.Robert Dewar10-32/+154
2013-01-02 Robert Dewar <dewar@adacore.com> * checks.adb (Apply_Scalar_Range_Check): Implement Check_Float_Overflow. * opt.ads, opt.adb: Handle flags Check_Float_Overflow[_Config]. * par-prag.adb: Add dummy entry for pragma Check_Float_Overflow. * sem_prag.adb: Implement pragma Check_Float_Overflow. * snames.ads-tmpl: Add entries for pragma Check_Float_Overflow. * switch-c.adb: Recognize -gnateF switch. * tree_io.ads: Update ASIS version number. * gnat_rm.texi: Add documentation of pragma Check_Float_Overflow. From-SVN: r194788
2013-01-02[multiple changes]Arnaud Charlet34-278/+326
2013-01-02 Robert Dewar <dewar@adacore.com> * checks.adb, exp_ch4.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_disp.adb, exp_dist.adb, exp_intr.adb, exp_prag.adb, exp_util.adb, freeze.adb, gnat1drv.adb, inline.adb, layout.adb, lib-xref.adb, par-ch10.adb, par-labl.adb, par-load.adb, par-util.adb, restrict.adb, sem_ch13.adb, sem_ch4.adb, sem_ch6.adb, sem_dim.adb, sem_elab.adb, sem_res.adb, sem_warn.adb, sinput-l.adb: Add tags to warning messages. * sem_ch6.ads, warnsw.ads, opt.ads: Minor comment updates. 2013-01-02 Robert Dewar <dewar@adacore.com> * err_vars.ads: Minor comment fix. 2013-01-02 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb: Refine predicate. From-SVN: r194787
2013-01-02[multiple changes]Arnaud Charlet27-351/+423
2013-01-02 Robert Dewar <dewar@adacore.com> * errout.ads: Minor comment fixes. * opt.ads: Minor comment additions. * exp_aggr.adb: Add tags to warning messages * exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_aggr.adb, sem_attr.adb, sem_case.adb, sem_cat.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_disp.adb, sem_dist.adb, sem_elab.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb, sem_prag.adb, sem_res.adb, sem_util.adb, sem_warn.adb: Add tags to warning messages 2013-01-02 Doug Rupp <rupp@adacore.com> * init.c [VMS] Remove subtest on reason mask for ACCVIO that is a C_E. 2013-01-02 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb: Recover source name for renamed packagea. From-SVN: r194786
2013-01-02errout.adb (Set_Msg_Insertion_Warning): Correct typo causing tests to fail ↵Robert Dewar12-220/+226
if insertion sequence is at end of message... 2013-01-02 Robert Dewar <dewar@adacore.com> * errout.adb (Set_Msg_Insertion_Warning): Correct typo causing tests to fail if insertion sequence is at end of message string. * opt.ads: Minor comment fixes and additions. * sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_ch10.adb, sem_ch11.adb, sem_ch12.adb, sem_ch13.adb: Add tags to warning messages. * sem_ch6.ads, sem_ch6.adb (Cannot_Inline): Deal with warning message tags. Add tags to warning messages. From-SVN: r194785
2013-01-02[multiple changes]Arnaud Charlet14-229/+434
2013-01-02 Robert Dewar <dewar@adacore.com> * err_vars.ads (Warning_Doc_Switch): New flag. * errout.adb (Error_Msg_Internal): Implement new warning flag doc tag stuff (Set_Msg_Insertion_Warning): New procedure. * errout.ads: Document new insertion sequences ?? ?x? ?.x? * erroutc.adb (Output_Msg_Text): Handle ?? and ?x? warning doc tag stuff. * erroutc.ads (Warning_Msg_Char): New variable. (Warn_Chr): New field in error message object. * errutil.adb (Error_Msg): Set Warn_Chr in error message object. * sem_ch13.adb: Minor reformatting. * warnsw.adb: Add handling for -gnatw.d and -gnatw.D (Warning_Doc_Switch). * warnsw.ads: Add handling of -gnatw.d/.D switches (warning doc tag). 2013-01-02 Robert Dewar <dewar@adacore.com> * opt.ads: Minor reformatting. 2013-01-02 Doug Rupp <rupp@adacore.com> * init.c: Reorganize VMS section. (scan_condtions): New function for scanning condition tables. (__gnat_handle_vms_condtion): Use actual exception name for imported exceptions vice IMPORTED_EXCEPTION. Move condition table scanning into separate function. Move formerly special handled conditions to system condition table. Use SYS$PUTMSG output to fill exception message field for formally special handled condtions, in particular HPARITH to provide more clues about cause and location then raised from the translated image. From-SVN: r194784
2013-01-02sem_ch13.adb (Analyze_Aspect_Specifications): For a Pre/Post aspect that ↵Thomas Quinot2-3/+21
applies to a library subprogram... 2013-01-02 Thomas Quinot <quinot@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): For a Pre/Post aspect that applies to a library subprogram, prepend corresponding pragma to the Pragmas_After list, in order for split AND THEN sections to be processed in the expected order. From-SVN: r194783
2013-01-02[multiple changes]Arnaud Charlet6-19/+71
2013-01-02 Thomas Quinot <quinot@adacore.com> * exp_prag.adb (Expand_Pragma_Check): The statements generated for the pragma must have the sloc of the pragma, not the sloc of the condition, otherwise this creates anomalies in the generated debug information that confuse coverage analysis tools. 2013-01-02 Thomas Quinot <quinot@adacore.com> * sem_ch13.adb: Minor reformatting. 2013-01-02 Arnaud Charlet <charlet@adacore.com> * g-excact.ads (Core_Dump): Clarify that this subprogram does not dump cores under Windows. 2013-01-02 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Analyze_Primitive_Renamed_Operation): The prefixed view of a subprogram has convention Intrnnsic, and a renaming of a prefixed view cannot be the prefix of an Access attribute. 2013-01-02 Robert Dewar <dewar@adacore.com> * restrict.adb: Minor reformatting. From-SVN: r194782
2013-01-02[multiple changes]Arnaud Charlet6-28/+68
2013-01-02 Thomas Quinot <quinot@adacore.com> * exp_prag.adb: Minor reformatting. 2013-01-02 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Get_Associated_Node): If the node is an identifier that denotes an unconstrained array in an object declaration, it is rewritten as the name of an anonymous subtype whose bounds are given by the initial expression in the declaration. When checking whether that identifier is global reference, use the original node, not the local generated subtype. 2013-01-02 Olivier Hainque <hainque@adacore.com> * tracebak.c: Revert previous change, incomplete. 2013-01-02 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): If the aspect appears on a subprogram body that acts as a spec, place the corresponding pragma in the declarations of the body, so that e.g. pre/postcondition checks can be generated appropriately. 2013-01-02 Robert Dewar <dewar@adacore.com> * sem_ch3.adb: Minor reformatting and code reorganization. From-SVN: r194781
2013-01-02[multiple changes]Arnaud Charlet4-24/+64
2013-01-02 Vincent Celier <celier@adacore.com> * switch-m.adb (Normalize_Compiler_Switches): Record the complete switch -fstack-check=specific instead of its shorter alias -fstack-check. 2013-01-02 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Derive_Subprogram): Enforce RM 6.3.1 (8): if the derived type is a tagged generic formal type with unknown discriminants, the inherited operation has convention Intrinsic. As such, the 'Access attribute cannot be applied to it. 2013-01-02 Thomas Quinot <quinot@adacore.com> * sem_attr.adb: Minor reformatting. From-SVN: r194780
2013-01-02[multiple changes]Arnaud Charlet4-13/+68
2013-01-02 Thomas Quinot <quinot@adacore.com> * par_sco.adb: Add SCO generation for S of protected types and single protected object declarations. 2013-01-02 Robert Dewar <dewar@adacore.com> * sem_eval.adb, osint.ads: Minor reformatting. From-SVN: r194779
2013-01-02[multiple changes]Arnaud Charlet4-72/+84
2013-01-02 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Pragma): Check the legality of pragma Assume. 2013-01-02 Thomas Quinot <quinot@adacore.com> * sem_eval.adb (Compile_Time_Compare): For static operands, we can perform a compile time comparison even if in preanalysis mode. 2013-01-02 Thomas Quinot <quinot@adacore.com> * par_sco.adb (SCO_Record): Always use Traverse_Declarations_Or_Statements to process the library level declaration, so that SCOs are properly generated for its aspects. From-SVN: r194778
2013-01-02scos.ads (In_Decision): Add missing entry for 'a'.Thomas Quinot4-13/+34
2013-01-02 Thomas Quinot <quinot@adacore.com> * scos.ads (In_Decision): Add missing entry for 'a'. * sem_prag.adb (Analyze_Pragma, case pragma Check): Omit call to Set_SCO_Pragma_Enabled for Invariant and Predicate. * sem_ch13.adb: Minor comment update. From-SVN: r194777
2012-12-21re PR ada/53737 (Assert_Failure on a generic package with a package as ↵Ed Schonberg2-0/+12
parameter) PR ada/53737 * sem_ch12.adb (Analyze_Associations): Do not check the legality of actuals for RACW types if this is an internal instantiation for a formal package with defaulted parameters. From-SVN: r194687
2012-12-21Fix copyright notices.Eric Botcazou5-5/+5
From-SVN: r194683
2012-12-21adaint.c: Move directive around.Eric Botcazou12-44/+58
* adaint.c: Move directive around. * argv.c: Likewise. * cio.c: Likewise. * cstreams.c: Likewise. * env.c: Likewise. * exit.c: Likewise. * init.c: Likewise. * initialize.c: Likewise. * raise.c: Likewise. * seh_init.c: Likewise. * targext.c: Likewise. From-SVN: r194660
2012-12-16AdjustEric Botcazou1-2/+3
From-SVN: r194533
2012-12-15re PR ada/53996 (format string issue in gcc-interface/utils.c)Eric Botcazou2-1/+7
PR ada/53996 * gcc-interface/utils.c (gnat_type_for_size): Use %u in lieu of %d. Co-Authored-By: Martin Ettl <ettl.martin@gmx.de> From-SVN: r194520
2012-12-11* gcc-interface/Make-lang.in (RTS_DIR): Define only if Ada is enabled.Eric Botcazou2-2/+10
From-SVN: r194384
2012-12-08trans.c (gnat_to_gnu): Assert that the type of the prefix is ultimately an ↵Eric Botcazou2-0/+9
array. * gcc-interface/trans.c (gnat_to_gnu) <N_Indexed_Component>: Assert that the type of the prefix is ultimately an array. From-SVN: r194323
2012-12-08trans.c (Subprogram_Body_to_gnu): Be prepared for a by-ref VAR_DECL in the ↵Eric Botcazou2-2/+13
case of an Out parameter passed by copy. * gcc-interface/trans.c (Subprogram_Body_to_gnu): Be prepared for a by-ref VAR_DECL in the case of an Out parameter passed by copy. From-SVN: r194321
2012-12-05[multiple changes]Arnaud Charlet6-13/+40
2012-12-05 Robert Dewar <dewar@adacore.com> * par_sco.adb, sem_prag.adb, put_scos.adb, get_scos.adb: Minor reformatting. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb: Code clean up. From-SVN: r194217
2012-12-05Make-lang.in: Update dependencies.Arnaud Charlet4-282/+287
* gcc-interface/Make-lang.in: Update dependencies. * gcc-interface/lang.opt: New language AdaSCIL. * gcc-interface/lang-specs.h: Add specs for adascil language. From-SVN: r194216
2012-12-05[multiple changes]Arnaud Charlet6-32/+90
2012-12-05 Thomas Quinot <quinot@adacore.com> * par_sco.adb (Traverse_Aspects): Ensure we always have an entry in the sloc -> SCO map for invariants, since Set_SCO_Pragma_Enabled is called with that sloc when checks are enabled. 2012-12-05 Thomas Quinot <quinot@adacore.com> * exp_ch4.adb: Minor reformatting. 2012-12-05 Hristian Kirtchev <kirtchev@adacore.com> * par-prag.adb: Checks and processing of pragma Assume are carried out by Sem_Prag. * sem_prag.adb (Analyze_Pragma): Check the legality of pragma Assume. * snames.ads-tmpl: Add new name Assume. Add a pragma identifier for Assume. From-SVN: r194215
2012-12-05aspects.ads, [...]: Add aspect Relative_Deadline.Ed Schonberg4-1/+63
2012-12-05 Ed Schonberg <schonberg@adacore.com> * aspects.ads, aspects.adb: Add aspect Relative_Deadline. * sem_ch13.adb (Analyze_Aspect_Specifications): Process aspect Relative_Deadline, and introduce the corresponding pragma within the task definition of the task type to which it applies. (Check_Aspect_At_Freeze_Point): Expression in a Relative_Deadline aspect is of type Time_Span. From-SVN: r194214
2012-12-05[multiple changes]Arnaud Charlet3-27/+89
2012-12-05 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Check_Loop_Invariant_Variant_Placement): When pragma Loop_[In]variant does not appear immediately within the statements of a loop, it must appear in a chain of nested blocks. 2012-12-05 Thomas Quinot <quinot@adacore.com> * sem_ch13.adb: Minor reformatting. Remove redundant assertion. From-SVN: r194213
2012-12-05Minor reformatting.Arnaud Charlet2-11/+13
From-SVN: r194212
2012-12-05[multiple changes]Arnaud Charlet10-169/+375
2012-12-05 Thomas Quinot <quinot@adacore.com> * par_sco.adb, scos.ads, put_scos.adb, put_scos.ads, get_scos.adb: Generation of SCOs for aspects. 2012-12-05 Thomas Quinot <quinot@adacore.com> * sem_prag.adb (Check_Precondition_Postcondition): Remove redundant call to Set_SCO_Pragma_Enabled (the pragma will be rewritten into a pragma Check later on, and the call will be made when processing the rewritten pragma). (Analyze_Pragma, case Pragma_Check): Omit call to Set_SCO_Pragma_Enabled if Split_PPC is set. 2012-12-05 Olivier Hainque <hainque@adacore.com> * tracebak.c: Add partial support for Lynx178. 2012-12-05 Hristian Kirtchev <kirtchev@adacore.com> * sem_attr.adb (Analyze_Attribute): Improve the error message related to loop assertions. 2012-12-05 Gary Dismukes <dismukes@adacore.com> * atree.ads: Minor reformatting. From-SVN: r194211
2012-12-05[multiple changes]Arnaud Charlet7-76/+134
2012-12-05 Robert Dewar <dewar@adacore.com> * atree.ads, par-ch4.adb, sem_attr.adb, sem_ch13.adb: Minor reformatting. 2012-12-05 Eric Botcazou <ebotcazou@adacore.com> * gnat_ugn.texi (Switches for gcc): Document -flto and reorder. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * par-ch5.adb (P_Condition): Handle properly Ada 2012 expressions that must be parenthesized before checking for redundant parentheses when that check is enabled. From-SVN: r194210
2012-12-05[multiple changes]Arnaud Charlet5-24/+76
2012-12-05 Ed Schonberg <schonberg@adacore.com> * par-ch4.adb (P_Allocator): In Ada 2012 (AI05-0104) an uninitialized allocator cannot carry an explicit not null indicator. * sem_ch4.adb (Analyze_Allocator): Remove code that implements the check for AI05-0104, the check is syntactic and performed in the parser. 2012-12-05 Geert Bosch <bosch@adacore.com> * sem_attr.adb (Analyze_Attribute): Use base type for floating point attributes. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications, Ahalyze_Aspect_Default_Value): For a scalar type attach default value to base type as well, because it is a type-specific aspect even though it can be specified on a first subtype. From-SVN: r194209
2012-12-05[multiple changes]Arnaud Charlet10-118/+556
2012-12-05 Yannick Moy <moy@adacore.com> * urealp.ads: Minor rewording. 2012-12-05 Yannick Moy <moy@adacore.com> * aspects.ads (No_Duplicates_Allowed): Forbid use of duplicate Contract_Cases aspects. * sem_prag.adb (Analyze_Pragma/Pragma_Contract_Case): Rename POST_CASE into CONTRACT_CASE in both grammar and code, to be consistent with current language definition. Issue a more precise error message when the pragma duplicates another pragma or aspect. 2012-12-05 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Add processing for attribute Update. (Expand_Update_Attribute): New routine. * par-ch4.adb (P_Name): The sole expression of attribute Update is an aggregate, parse it accordingly. * sem_attr.adb (Analyze_Attribute): Verify the legality of attribute Update. (Eval_Attribute): Attribute Update does not need evaluation because it is never static. * snames.ads-tmpl: Add Name_Update to the list of special names recognized by the compiler. Add an Attribute_Id for Update. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * exp_util.adb (Remove_Side_Effects): For purposes of removing side effects, qualified expressions do not receive a special treatment, even though in Ada 2012 they are defined as object references. 2012-12-05 Thomas Quinot <quinot@adacore.com> * par-ch3.adb: Minor reformatting. From-SVN: r194207
2012-12-05exp_dist.adb (Build_From_Any_Call, [...]): For a used-defined subtype, ↵Thomas Quinot2-4/+32
always go to the first subtype of the base type. 2012-12-05 Thomas Quinot <quinot@adacore.com> * exp_dist.adb (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call): For a used-defined subtype, always go to the first subtype of the base type. From-SVN: r194206
2012-12-05[multiple changes]Arnaud Charlet8-27/+52
2012-12-05 Thomas Quinot <quinot@adacore.com> * exp_dist.adb: Minor reformatting. 2012-12-05 Tristan Gingold <gingold@adacore.com> * Make-generated.in: Remove the VMS host specific part, as VMS compilers aren't built anymore on VMS. 2012-12-05 Thomas Quinot <quinot@adacore.com> * sem.adb, errout.ads, atree.adb, atree.ads (Check_Error_Detected): Only return quietly if a serious error of configurable run time violation has been found. 2012-12-05 Yannick Moy <moy@adacore.com> * sem_res.adb (Resolve_Type_Conversion): In Alfa_Mode, do not apply conversion checks. From-SVN: r194205
2012-12-05[multiple changes]Arnaud Charlet14-36/+128
2012-12-05 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_N_Assignment_Statement): Handle properly the generation of discriminant checks when the left-hand side has a type with hidden discriminants. * sem_ch3.ads (Is_Visible_Component): Add defaulted parameter to specify the node on which component visibility is being checked. * sem_ch3.adb (Is_Visible_Component): Use new parameter to determine whether the reference comes from a type conversion to a full view of a private type with unknown discriminants. * sem_ch4.adb (Analyze_Selected_Component): Call Is_Visible_Component with added parameter. 2012-12-05 Arnaud Charlet <charlet@adacore.com> * make.adb: Minor comment update. 2012-12-05 Arnaud Charlet <charlet@adacore.com> * gnatlink.adb: Also use -x adascil in CodePeer mode when calling gcc. * exp_ch5.adb: Minor reformatting. 2012-12-05 Bob Duff <duff@adacore.com> * exp_ch4.adb: Minor comment. 2012-12-05 Bob Duff <duff@adacore.com> * par-ch4.adb: Set Paren_Count correctly for a parenthesized expression containing a conditional expression or quantified expression. * sprint.adb: Update comment. 2012-12-05 Bob Duff <duff@adacore.com> * style.adb, scans.ads, styleg.adb: Update comments. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Find_Selected_Component): Handle properly an expanded name whose prefix is the expanded name of an enclosing entry, that is to say a construct such as T.E.X, where T is an enclosing concurrent type and E is an enclosing entry. From-SVN: r194204
2012-12-05[multiple changes]Arnaud Charlet12-259/+381
2012-12-05 Robert Dewar <dewar@adacore.com> * lib-writ.adb (Write_ALI): Output T lines. * lib-writ.ads: Minor reformatting. Add documentation of T lines. * opt.ads (Generate_Target_Dependent_Info): New flag. * switch-c.adb (Scan_Switches): Recognize -gnatet switch (target dependent info). * ttypes.ads: Add four letter codes to declarations (for target dependent info). * usage.adb: Add line for -gnatet switch. 2012-12-05 Hristian Kirtchev <kirtchev@adacore.com> * exp_prag.adb (Expand_N_Pragma): Add a call to expand pragma Loop_Variant. (Expand_Pragma_Loop_Assertion): Removed. (Expand_Pragma_Loop_Variant): New routine. * par-prag.adb: Remove Pragma_Loop_Assertion and add two new Pragma_Loop_Invariant and Pragma_Loop_Variant entries. * sem_attr.adb (Analyze_Attribute): Update the code which locates the enclosing pragma. * sem_prag.adb (Analyze_Pragma): Remove the code which analyzes pragma Loop_Assertion as the pragma is now obsolete. Add the machinery to checks the semantics of pragmas Loop_Invariant and Loop_Variant. (Check_Loop_Invariant_Variant_Placement): New routine. * snames.ads-tmpl: Remove name Loop_Assertion. Add new names Loop_Invariant and Loop_Variant. Rename Name_Decreasing to Name_Decreases and Name_Increasing to Name_Increases. Remove the pragma Id for Loop_Assertion and add two new Ids for Loop_Invariant and Loop_Variant. From-SVN: r194203
2012-12-05[multiple changes]Arnaud Charlet12-46/+90
2012-12-05 Robert Dewar <dewar@adacore.com> * gnatchop.adb, sem_attr.ads, sem_ch4.adb, sem_ch6.adb, exp_disp.adb, atree.adb, sem_eval.adb: Minor reformatting. 2012-12-05 Yannick Moy <moy@adacore.com> * uintp.adb (UI_Div_Rem): Correct algorithm D to remove potential overflow. 2012-12-05 Robert Dewar <dewar@adacore.com> * exp_ch4.adb (Expand_N_Op_Mod): Minor comment additions. (Expand_N_Op_Rem): Ditto. 2012-12-05 Robert Dewar <dewar@adacore.com> * sem_attr.adb: Minor reformatting. 2012-12-05 Robert Dewar <dewar@adacore.com> * usage.adb: Update lines for -gnato? switch. From-SVN: r194202
2012-12-05[multiple changes]Arnaud Charlet4-13/+35
2012-12-05 Ed Schonberg <schonberg@adacore.com> * par-ch6.adb (P_Return_Object_Declaration): Do not check for legality of Aliased keyword. * sem_ch6.adb (Analyze_Function_Return): The keyword aliased is legal in an extended return statement only if the return type is immutably limited. 2012-12-05 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Expand_Interface_Thunk): Simplify management of controlling formals. Required to avoid problems with primitives of internally generated base types associated with constrained tagged types. From-SVN: r194201
2012-12-05[multiple changes]Arnaud Charlet13-18/+815
2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_eval.adb: Remove spurious warnings. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Build_Explicit_Dereference): Set properly the type of the prefix prior to rewriting, because subsequent legality checks examine the original node. 2012-12-05 Hristian Kirtchev <kirtchev@adacore.com> * aspects.adb: Add Contract_Cases to the canonical aspects map. * aspects.ads: Add aspect Contract_Cases in the various aspect tables. * par-prag.adb: The parser does not need to perform special actions for pragma Contract_Cases. * sem_ch6.adb (Expand_Contract_Cases): New routine. (Process_Contract_Cases): Convert pragma Contract_Cases into pre- and post- condition checks that verify the runtime state of all case guards and their corresponding consequences. * sem_ch13.adb (Analyze_Aspect_Specifications): Perform various legality checks on aspect Contract_Cases. The aspect is transformed into a pragma. * sem_prag.adb: Add an entry in table Sig_Flags for pragma Contract_Cases. (Analyze_Pragma): Perform various legality checks on pragma Contract_Cases. The pragma is associated with the contract of the related subprogram. (Chain_CTC): Omit pragma Contract_Cases because it does not introduce a unique case name and does not follow the syntax of Contract_Case and Test_Case. * snames.ads-tmpl: Add new name Name_Contract_Cases. Add a Pragma_Id for Contract_Cases. 2012-12-05 Thomas Quinot <quinot@adacore.com> * sem_ch5.adb: Minor reformatting. 2012-12-05 Hristian Kirtchev <kirtchev@adacore.com> * sem_attr.ads: Add an entry for attribute Loop_Entry in the Attribute_Impl_Def table. 2012-12-05 Bob Duff <duff@adacore.com> * gnatchop.adb (Read_File): Avoid storage leak, and in most cases avoid an extra copy of the string. From-SVN: r194199
2012-12-05[multiple changes]Arnaud Charlet4-3/+64
2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Preanalyze_Range): If the expression, which denotes some domain of iteration, has a type with implicit dereference, and does not have any iterable aspects, insert dereference to obtain proper container type. 2012-12-05 Bob Duff <duff@adacore.com> * par-ch8.adb (P_Use_Type_Clause): Fix the Sloc for "use all type ..." to point to "use". 2012-12-05 Arnaud Charlet <charlet@adacore.com> * make.adb (Compile): Always pass -x adascil in CodePeer mode. From-SVN: r194198
2012-12-05[multiple changes]Arnaud Charlet12-11/+166
2012-12-05 Ed Schonberg <schonberg@adacore.com> * s-rident.ads, restrict.ads: Remove discrepancies between the documentation on implementation-defined restrictions, and the internal data structure used for warnings and errors on implementation-defined restriction violations. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Chain_PPC): Pre- and postcondition aspects are legal on a subprogram body that acts as a spec. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch8.adb (Find_Selected_Component): If the selector name is an overloadable entity but the name is not overloaded, generate reference to it rather than delaying this until resolution. 2012-12-05 Robert Dewar <dewar@adacore.com> * checks.ads, checks.adb (Activate_Overflow_Check): No effect for MOD/REM/unary + * exp_ch4.adb (Expand_N_Op_Mod): Remove call to set Do_Overflow_Check. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Find_Non_Universal_Interpretation): Use the types of the right operand if the left operand is null. 2012-12-05 Sergey Rybin <rybin@adacore.com frybin> * gnat_ugn.texi, vms_data.ads: document gnatpp -nn option. 2012-12-05 Jose Ruiz <ruiz@adacore.com> * init.c (__gnat_install_handler): For the LEON VxWorks kernel run-time library we need to install a trap handler directly in the trap table (no support by the OS) for the software trap 0. From-SVN: r194196
2012-12-05[multiple changes]Arnaud Charlet4-9/+23
2012-12-05 Eric Botcazou <ebotcazou@adacore.com> * gnat_rm.texi (Interfacing to C++): Document new restrictions. 2012-12-05 Ben Brosgol <brosgol@adacore.com> * gnat_ugn.texi: Fix typo. 2012-12-05 Robert Dewar <dewar@adacore.com> * gnatbind.adb: Minor reformatting. From-SVN: r194195
2012-12-05[multiple changes]Arnaud Charlet4-4/+23
2012-12-05 Arnaud Charlet <charlet@adacore.com> * gnat_ugn.texi: Fix typo. 2012-12-05 Tristan Gingold <gingold@adacore.com> * gnatbind.adb: Minor comment update. 2012-12-05 Yannick Moy <moy@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Set flags to indicate that CodePeer backend deals with divide and overflow checks. From-SVN: r194194
2012-12-05gnat_rm.texi: Update overflow description.Robert Dewar11-115/+115
2012-12-05 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Update overflow description. Pragma Overflow_Checks changed to Overflow_Mode. 2012-12-05 Robert Dewar <dewar@adacore.com> * checks.ads, exp_ch4.adb, gnat1drv.adb, par-prag.adb, sem_prag.adb, snames.ads-tmpl, switch-c.adb, types.ads, checks.adb: Change pragma Overflow_Checks to Overflow_Mode. Separate overflow checking from overflow mode. Several name changes to reflect this separation. CHECKED mode is renamed STRICT mode. From-SVN: r194193
2012-12-05[multiple changes]Arnaud Charlet6-232/+258
2012-12-05 Yannick Moy <moy@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Move setting of flags for Alfa mode before general treatment of flags, so that overflow checks settings are set appropriately in Alfa mode. Also set the mode to STRICT in Alfa mode if not already set by the user. 2012-12-05 Robert Dewar <dewar@adacore.com> * sem_ch3.adb: Minor reformatting. 2012-12-05 Steve Baird <baird@adacore.com> * sinfo.ads: Improve comments about SCIL-related node kinds and selector functions. 2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Build_Limited_Views): Even though the unit is not analyzed, place its entity on the name in the with clause, so that warnings on unused with-clause are properly supported for limited withs. 2012-12-05 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Update overflow description. Pragma Overflow_Checks changed to Overflow_Mode. From-SVN: r194191
2012-12-05[multiple changes]Arnaud Charlet6-18/+62
2012-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Build_Derived_Private_Type): Handle properly a completion in a grand-child unit when the parent type is itself a private type in a child unit whose full view is itself a derivation from a private type. 2012-12-05 Gary Dismukes <dismukes@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference, case Attribute_Valid): Remove code for issuing warning on Valid within a predicate. Moved to Sem_Attr. Remove with and use of Errout. * sem_attr.adb (Analyze_Attribute, case Attribute_Valid): Test for prefix's subtype having a predicate and issue warning about infinite recursion if Valid occurs within the subtype's predicate. Warning moved here from Exp_Attr. 2012-12-05 Yannick Moy <moy@adacore.com> * debug.adb: Minor comment addition. 2012-12-05 Yannick Moy <moy@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): In CodePeer mode, check overflows by default, even when the user suppresses overflow checks. From-SVN: r194190
2012-12-05[multiple changes]Arnaud Charlet3-20/+109
2012-12-05 Thomas Quinot <quinot@adacore.com> * err_vars.ads: Fix minor typo in comment. 2012-12-05 Hristian Kirtchev <kirtchev@adacore.com> * sem_attr.adb (Analyze_Attribute): Do not analyze the attribute arguments when processing Loop_Entry. Rewrite the analysis of attribute Loop_Entry to handle an optional loop name. (Convert_To_Indexed_Component): New routine. (Eval_Attribute): Remove ??? comment and explain why Loop_Entry does not need to be evaluated. From-SVN: r194189
2012-12-01re PR ada/52110 (s-osinte.ads:447:09: "clockid_t" conflicts with declaration ↵John David Anglin3-2/+18
at line 194) PR ada/52110 * s-osinte-hpux-dce.ads: Declare pthread_rwlockattr_t and pthread_rwlock_t subtypes. Delete duplicate declaration of clockid_t. * s-taspri-hpux-dce.ads: Change "pragma Atomic (Thread)" to comment. From-SVN: r194024
2012-11-28Fix date and trailing space in previous commit.Eric Botcazou2-2/+2
From-SVN: r193887
2012-11-28stor-layout.c (layout_type): Do not clear TREE_OVERFLOW on overflowed ↵Eric Botcazou6-72/+101
zeroes, except in one specific case. * stor-layout.c (layout_type) <ARRAY_TYPE>: Do not clear TREE_OVERFLOW on overflowed zeroes, except in one specific case. ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use valid_constant_size_p to detect too large objects. <E_Subprogram_Type>: Likewise for too large return types. (allocatable_size_p): Call valid_constant_size_p in the fixed case. (annotate_value) <INTEGER_CST>: Simplify. <BIT_AND_EXPR>: Deal with negative values here. * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Use valid_constant_size_p to detect too large objects on the LHS. * gcc-interface/misc.c (default_pass_by_ref): Likewise for large types. And use TYPE_SIZE_UNIT throughout. (must_pass_by_ref): Likewise. * gcc-interface/utils.c (max_size) <tcc_unary>: Split from common case. <tcc_binary>: Likewise. Call size_binop instead of fold_build2. <tcc_expression>: Simplify. * gcc-interface/utils2.c (build_allocator): Use valid_constant_size_p to detect too large allocations. From-SVN: r193886
2012-11-23trans.c (Attribute_to_gnu): Look through a view conversion from constrained ↵Eric Botcazou2-1/+19
to unconstrained form. * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Length>: Look through a view conversion from constrained to unconstrained form. From-SVN: r193751
2012-11-23decl.c (components_need_strict_alignment): New.Eric Botcazou2-9/+54
* gcc-interface/decl.c (components_need_strict_alignment): New. (components_to_record): Do not pack the variants if one of the fields needs strict alignment. Likewise for the variant part as a whole. Specify the position of the variants even if the size isn't specified, but do not specify the size of the variant part in this case. From-SVN: r193750