aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc
AgeCommit message (Collapse)AuthorFilesLines
2018-05-24[Ada] Fix typos in documentationCyrille Comar1-3/+3
2018-05-24 Cyrille Comar <comar@adacore.com> gcc/ada/ * doc/gnat_rm/the_gnat_library.rst: Fix typos. * gnat_rm.texi: Regenerate. From-SVN: r260651
2018-05-24[Ada] Fix inconsistent documentation for the Contract_Cases pragmaPiotr Trojanek1-6/+6
This patch propagates the renaming from "condition" to "case guard" in the contract grammar to the paragraphs that describe the pragma semantics. 2018-05-24 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases): Change "condition" to "case guard" after renaming in the contract grammar. * gnat_rm.texi: Regenerate. From-SVN: r260647
2018-05-23[Ada] Clarify meaning of local pragma Warnings Off without OnYannick Moy1-0/+4
A local use of pragma Warnings Off to suppress specific messages, when not followed by a matching pragma Warnings On, extends until the end of the file. 2018-05-23 Yannick Moy <moy@adacore.com> gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of local pragma Warnings Off without On. * gnat_rm.texi: Regenerate. From-SVN: r260589
2018-05-23[Ada] Restrict initialization of External_Tag and Expanded_NameJavier Miranda2-0/+10
2018-05-23 Javier Miranda <miranda@adacore.com> gcc/ada/ * exp_disp.adb (Make_DT): Restrict the initialization of External_Tag and Expanded_Name to an empty string to the case where both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since restricted runtimes are compiled with pragma Discard_Names. * doc/gnat_rm/implementation_defined_pragmas.rst, doc/gnat_rm/implementation_defined_characteristics.rst: Add documentation. * gnat_rm.texi: Regenerate. From-SVN: r260584
2018-05-22[Ada] Allow attribute 'Valid_Scalars on private typesHristian Kirtchev1-26/+25
This patch modifies the analysis and expansion of attribute 'Valid_Scalars. It is now possible to specify the attribute on a prefix of an untagged private type. ------------ -- Source -- ------------ -- gnat.adc pragma Initialize_Scalars; -- pack1.ads package Pack1 is type Acc_1 is private; type Acc_2 is private; type Arr_1 is private; type Arr_2 is private; type Bool_1 is private; type Cmpx_1 is private; type Cmpx_2 is private; type Enum_1 is private; type Enum_2 is private; type Fix_1 is private; type Fix_2 is private; type Flt_1 is private; type Flt_2 is private; type Modl_1 is private; type Prot_1 is limited private; type Prot_2 is limited private; type Prot_3 (Discr : Boolean) is limited private; type Rec_1 is private; type Rec_2 is private; type Rec_3 is private; type Rec_4 (Discr : Boolean) is private; type Rec_5 (Discr_1 : Boolean; Discr_2 : Boolean) is private; type Sign_1 is private; type Tag_1 is tagged private; type Task_1 is limited private; type Task_2 (Discr : Boolean) is limited private; type Prec_Arr_1 is private; type Prec_Arr_2 is private; type Prec_Arr_3 is private; type Prec_Arr_4 is private; type Prec_Arr_5 is private; type Prec_Rec_1 is private; type Prec_Rec_2 (Discr : Boolean) is private; type Prec_Rec_3 (Discr_1 : Boolean; Discr_2 : Boolean) is private; type Prec_Rec_4 is private; type Prec_Rec_5 is private; type Prec_Rec_6 is private; type Prec_Rec_7 is private; type Prec_Rec_8 is private; type Prec_Rec_9 is private; private type Acc_1 is access Boolean; type Acc_2 is access procedure; type Arr_1 is array (1 .. 10) of Boolean; type Arr_2 is array (1 .. 3) of access Boolean; type Bool_1 is new Boolean; type Cmpx_1 is array (1 .. 5) of Rec_5 (True, True); type Cmpx_2 is record Comp_1 : Cmpx_1; Comp_2 : Rec_4 (True); end record; type Enum_1 is (One, Two, Three); type Enum_2 is ('f', 'o', 'u', 'r'); type Fix_1 is delta 0.5 range 0.0 .. 10.0; type Fix_2 is delta 0.1 digits 15; type Flt_1 is digits 8; type Flt_2 is digits 10 range -1.0 .. 1.0; type Modl_1 is mod 8; protected type Prot_1 is end Prot_1; protected type Prot_2 is private Comp_1 : Boolean; Comp_2 : Boolean; end Prot_2; protected type Prot_3 (Discr : Boolean) is private Comp_1 : Boolean; Comp_2 : Rec_4 (Discr); end Prot_3; type Rec_1 is null record; type Rec_2 is record null; end record; type Rec_3 is record Comp_1 : Boolean; Comp_2 : Boolean; end record; type Rec_4 (Discr : Boolean) is record case Discr is when True => Comp_1 : Boolean; Comp_2 : Boolean; when False => Comp_3 : access Boolean; end case; end record; type Rec_5 (Discr_1 : Boolean; Discr_2 : Boolean) is record Comp_1 : Boolean; Comp_2 : Boolean; case Discr_1 is when True => case Discr_2 is when True => Comp_3 : Boolean; Comp_4 : Boolean; when False => null; end case; when False => null; end case; end record; type Sign_1 is range 1 .. 10; type Tag_1 is tagged null record; task type Task_1; task type Task_2 (Discr : Boolean); type Prec_Arr_1 is array (1 .. 2) of Boolean; type Prec_Arr_2 is array (1 .. 2, 1 .. 2) of Boolean; type Prec_Arr_3 is array (1 .. 2) of Prec_Rec_1; type Prec_Arr_4 is array (1 .. 2) of Prec_Rec_2 (True); type Prec_Arr_5 is array (1 .. 2) of Prec_Rec_3 (True, True); type Prec_Rec_1 is record Comp_1 : Boolean; end record; type Prec_Rec_2 (Discr : Boolean) is record case Discr is when True => Comp_1 : Boolean; when others => Comp_2 : Boolean; end case; end record; type Prec_Rec_3 (Discr_1 : Boolean; Discr_2 : Boolean) is record case Discr_1 is when True => case Discr_2 is when True => Comp_1 : Boolean; when others => Comp_2 : Boolean; end case; when False => case Discr_2 is when True => Comp_3 : Boolean; when others => Comp_4 : Boolean; end case; end case; end record; type Prec_Rec_4 is record Comp : Prec_Arr_1; end record; type Prec_Rec_5 is record Comp : Prec_Arr_4; end record; type Prec_Rec_6 is record Comp : Prec_Arr_5; end record; type Prec_Rec_7 is record Comp : Prec_Rec_4; end record; type Prec_Rec_8 is record Comp : Prec_Rec_5; end record; type Prec_Rec_9 is record Comp : Prec_Rec_6; end record; end Pack1; -- pack1.adb package body Pack1 is protected body Prot_1 is end Prot_1; protected body Prot_2 is end Prot_2; protected body Prot_3 is end Prot_3; task body Task_1 is begin null; end Task_1; task body Task_2 is begin null; end Task_2; end Pack1; -- pack2.ads with Pack1; use Pack1; package Pack2 is type Acc_3 is private; type Acc_4 is private; type Arr_3 is private; type Arr_4 is private; type Bool_2 is private; type Cmpx_3 is private; type Cmpx_4 is private; type Enum_3 is private; type Enum_4 is private; type Fix_3 is private; type Fix_4 is private; type Flt_3 is private; type Flt_4 is private; type Modl_2 is private; type Prot_4 is limited private; type Prot_5 is limited private; type Prot_6 is limited private; type Rec_6 is private; type Rec_7 is private; type Rec_8 is private; type Rec_9 (Discr : Boolean) is private; type Rec_10 (Discr : Boolean) is private; type Sign_2 is private; type Task_3 is limited private; private type Acc_3 is new Acc_1; type Acc_4 is new Acc_2; type Arr_3 is new Arr_1; type Arr_4 is new Arr_2; type Bool_2 is new Bool_1; type Cmpx_3 is new Cmpx_1; type Cmpx_4 is new Cmpx_2; type Enum_3 is new Enum_1; type Enum_4 is new Enum_2; type Fix_3 is new Fix_1; type Fix_4 is new Fix_2; type Flt_3 is new Flt_1; type Flt_4 is new Flt_2; type Modl_2 is new Modl_1; type Prot_4 is new Prot_1; type Prot_5 is new Prot_2; type Prot_6 is new Prot_3 (True); type Rec_6 is new Rec_1; type Rec_7 is new Rec_2; type Rec_8 is new Rec_3; type Rec_9 (Discr : Boolean) is new Rec_4 (Discr => Discr); type Rec_10 (Discr : Boolean) is new Rec_5 (Discr_1 => Discr, Discr_2 => True); type Sign_2 is new Sign_1; type Task_3 is new Task_1; end Pack2; -- main.adb with Ada.Text_IO; use Ada.Text_IO; with Pack1; use Pack1; with Pack2; use Pack2; procedure Main is procedure Check (Actual : Boolean; Valid : Boolean; Test : String) is begin if Actual /= Valid then Put_Line ("ERROR " & Test); Put_Line (" valid : " & Valid'Img); Put_Line (" actual: " & Actual'Img); end if; end Check; Valid : constant Boolean := True; Not_Valid : constant Boolean := not Valid; pragma Warnings (Off); Acc_1_Obj : Acc_1; Acc_2_Obj : Acc_2; Acc_3_Obj : Acc_3; Acc_4_Obj : Acc_4; Arr_1_Obj : Arr_1; Arr_2_Obj : Arr_2; Arr_3_Obj : Arr_3; Arr_4_Obj : Arr_4; Bool_1_Obj : Bool_1; Bool_2_Obj : Bool_2; Cmpx_1_Obj : Cmpx_1; Cmpx_2_Obj : Cmpx_2; Cmpx_3_Obj : Cmpx_3; Cmpx_4_Obj : Cmpx_4; Enum_1_Obj : Enum_1; Enum_2_Obj : Enum_2; Enum_3_Obj : Enum_3; Enum_4_Obj : Enum_4; Fix_1_Obj : Fix_1; Fix_2_Obj : Fix_2; Fix_3_Obj : Fix_3; Fix_4_Obj : Fix_4; Flt_1_Obj : Flt_1; Flt_2_Obj : Flt_2; Flt_3_Obj : Flt_3; Flt_4_Obj : Flt_4; Modl_1_Obj : Modl_1; Modl_2_Obj : Modl_2; Prot_1_Obj : Prot_1; Prot_2_Obj : Prot_2; Prot_3_Obj : Prot_3 (True); Prot_4_Obj : Prot_4; Prot_5_Obj : Prot_5; Rec_1_Obj : Rec_1; Rec_2_Obj : Rec_2; Rec_3_Obj : Rec_3; Rec_4_Obj : Rec_4 (True); Rec_5_Obj : Rec_5 (True, True); Rec_6_Obj : Rec_6; Rec_7_Obj : Rec_7; Rec_8_Obj : Rec_8; Rec_9_Obj : Rec_9 (True); Sign_1_Obj : Sign_1; Sign_2_Obj : Sign_2; Tag_1_Obj : Tag_1; Task_1_Obj : Task_1; Task_2_Obj : Task_2 (True); Task_3_Obj : Task_3; Prec_Arr_1_Obj : Prec_Arr_1; Prec_Arr_2_Obj : Prec_Arr_2; Prec_Arr_3_Obj : Prec_Arr_3; Prec_Arr_4_Obj : Prec_Arr_4; Prec_Arr_5_Obj : Prec_Arr_5; Prec_Rec_1_Obj : Prec_Rec_1; Prec_Rec_2_Obj : Prec_Rec_2 (True); Prec_Rec_3_Obj : Prec_Rec_3 (True, True); Prec_Rec_4_Obj : Prec_Rec_4; Prec_Rec_5_Obj : Prec_Rec_5; Prec_Rec_6_Obj : Prec_Rec_6; Prec_Rec_7_Obj : Prec_Rec_7; Prec_Rec_8_Obj : Prec_Rec_8; Prec_Rec_9_Obj : Prec_Rec_9; pragma Warnings (On); begin Check (Acc_1_Obj'Valid_Scalars, Valid, "Acc_1_Obj"); Check (Acc_2_Obj'Valid_Scalars, Valid, "Acc_2_Obj"); Check (Acc_3_Obj'Valid_Scalars, Valid, "Acc_3_Obj"); Check (Acc_4_Obj'Valid_Scalars, Valid, "Acc_4_Obj"); Check (Arr_1_Obj'Valid_Scalars, Not_Valid, "Arr_1_Obj"); Check (Arr_2_Obj'Valid_Scalars, Valid, "Arr_2_Obj"); Check (Arr_3_Obj'Valid_Scalars, Not_Valid, "Arr_3_Obj"); Check (Arr_4_Obj'Valid_Scalars, Valid, "Arr_4_Obj"); Check (Bool_1_Obj'Valid_Scalars, Not_Valid, "Bool_1_Obj"); Check (Bool_2_Obj'Valid_Scalars, Not_Valid, "Bool_2_Obj"); Check (Cmpx_1_Obj'Valid_Scalars, Not_Valid, "Cmpx_1_Obj"); Check (Cmpx_2_Obj'Valid_Scalars, Not_Valid, "Cmpx_2_Obj"); Check (Cmpx_3_Obj'Valid_Scalars, Not_Valid, "Cmpx_3_Obj"); Check (Cmpx_4_Obj'Valid_Scalars, Not_Valid, "Cmpx_4_Obj"); Check (Enum_1_Obj'Valid_Scalars, Not_Valid, "Enum_1_Obj"); Check (Enum_2_Obj'Valid_Scalars, Not_Valid, "Enum_2_Obj"); Check (Enum_3_Obj'Valid_Scalars, Not_Valid, "Enum_3_Obj"); Check (Enum_4_Obj'Valid_Scalars, Not_Valid, "Enum_4_Obj"); Check (Fix_1_Obj'Valid_Scalars, Not_Valid, "Fix_1_Obj"); Check (Fix_2_Obj'Valid_Scalars, Not_Valid, "Fix_2_Obj"); Check (Fix_3_Obj'Valid_Scalars, Not_Valid, "Fix_3_Obj"); Check (Fix_4_Obj'Valid_Scalars, Not_Valid, "Fix_4_Obj"); Check (Flt_1_Obj'Valid_Scalars, Not_Valid, "Flt_1_Obj"); Check (Flt_2_Obj'Valid_Scalars, Not_Valid, "Flt_2_Obj"); Check (Flt_3_Obj'Valid_Scalars, Not_Valid, "Flt_3_Obj"); Check (Flt_4_Obj'Valid_Scalars, Not_Valid, "Flt_4_Obj"); Check (Modl_1_Obj'Valid_Scalars, Not_Valid, "Modl_1_Obj"); Check (Modl_2_Obj'Valid_Scalars, Not_Valid, "Modl_2_Obj"); Check (Prot_1_Obj'Valid_Scalars, Valid, "Prot_1_Obj"); Check (Prot_2_Obj'Valid_Scalars, Not_Valid, "Prot_2_Obj"); Check (Prot_3_Obj'Valid_Scalars, Not_Valid, "Prot_3_Obj"); Check (Prot_4_Obj'Valid_Scalars, Valid, "Prot_4_Obj"); Check (Prot_5_Obj'Valid_Scalars, Not_Valid, "Prot_5_Obj"); Check (Rec_1_Obj'Valid_Scalars, Valid, "Rec_1_Obj"); Check (Rec_2_Obj'Valid_Scalars, Valid, "Rec_2_Obj"); Check (Rec_3_Obj'Valid_Scalars, Not_Valid, "Rec_3_Obj"); Check (Rec_4_Obj'Valid_Scalars, Not_Valid, "Rec_4_Obj"); Check (Rec_5_Obj'Valid_Scalars, Not_Valid, "Rec_5_Obj"); Check (Rec_6_Obj'Valid_Scalars, Valid, "Rec_6_Obj"); Check (Rec_7_Obj'Valid_Scalars, Valid, "Rec_7_Obj"); Check (Rec_8_Obj'Valid_Scalars, Not_Valid, "Rec_8_Obj"); Check (Rec_9_Obj'Valid_Scalars, Not_Valid, "Rec_9_Obj"); Check (Sign_1_Obj'Valid_Scalars, Not_Valid, "Sign_1_Obj"); Check (Sign_2_Obj'Valid_Scalars, Not_Valid, "Sign_2_Obj"); Check (Tag_1_Obj'Valid_Scalars, Valid, "Tag_1_Obj"); Check (Task_1_Obj'Valid_Scalars, Valid, "Task_1_Obj"); Check (Task_2_Obj'Valid_Scalars, Valid, "Task_2_Obj"); Check (Task_3_Obj'Valid_Scalars, Valid, "Task_3_Obj"); Check (Prec_Arr_1_Obj'Valid_Scalars, Not_Valid, "Prec_Arr_1_Obj"); Check (Prec_Arr_2_Obj'Valid_Scalars, Not_Valid, "Prec_Arr_2_Obj"); Check (Prec_Arr_3_Obj'Valid_Scalars, Not_Valid, "Prec_Arr_3_Obj"); Check (Prec_Arr_4_Obj'Valid_Scalars, Not_Valid, "Prec_Arr_4_Obj"); Check (Prec_Arr_5_Obj'Valid_Scalars, Not_Valid, "Prec_Arr_5_Obj"); Check (Prec_Rec_1_Obj'Valid_Scalars, Not_Valid, "Prec_Rec_1_Obj"); Check (Prec_Rec_2_Obj'Valid_Scalars, Not_Valid, "Prec_Rec_2_Obj"); Check (Prec_Rec_3_Obj'Valid_Scalars, Not_Valid, "Prec_Rec_3_Obj"); Check (Prec_Rec_4_Obj'Valid_Scalars, Not_Valid, "Prec_Rec_4_Obj"); Check (Prec_Rec_5_Obj'Valid_Scalars, Not_Valid, "Prec_Rec_5_Obj"); Check (Prec_Rec_6_Obj'Valid_Scalars, Not_Valid, "Prec_Rec_6_Obj"); Check (Prec_Rec_7_Obj'Valid_Scalars, Not_Valid, "Prec_Rec_7_Obj"); Check (Prec_Rec_8_Obj'Valid_Scalars, Not_Valid, "Prec_Rec_8_Obj"); Check (Prec_Rec_9_Obj'Valid_Scalars, Not_Valid, "Prec_Rec_9_Obj"); end Main; ----------------- -- Compilation -- ----------------- $ gnatmake -q main.adb $ ./main 2018-05-22 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * exp_attr.adb (Build_Array_VS_Func): Reimplemented. (Build_Record_VS_Func): Reimplemented. (Expand_N_Attribute): Reimplement the handling of attribute 'Valid_Scalars. * sem_attr.adb (Analyze_Attribute): Reimplement the handling of attribute 'Valid_Scalars. * sem_util.adb (Scalar_Part_Present): Reimplemented. (Validated_View): New routine. * sem_util.ads (Scalar_Part_Present): Update the parameter profile and comment on usage. (Validated_View): New routine. * doc/gnat_rm/implementation_defined_attributes.rst: Update the documentation of attribute 'Valid_Scalars. * gnat_rm.texi: Regenerate. From-SVN: r260518
2018-05-22[Ada] Document new switches for gnatppBob Duff1-0/+27
2018-05-22 Bob Duff <duff@adacore.com> gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for the new --split-line-before-record, --indent-named-statements and --no-align-modes gnatpp switches. From-SVN: r260515
2018-05-22[Ada] Adding support for Ada.Locales packageJavier Miranda1-3/+1
This patch adds generic support for the Ada.Locales package that relies on the setlocale() C service. 2018-05-22 Javier Miranda <miranda@adacore.com> gcc/ada/ * locales.c: New implementation for the Ada.Locales package. * libgnat/a-locale.ads: Remove comment indicating that this is not implemented. * doc/gnat_rm/standard_library_routines.rst: Remove comment indicating that this is not implemented. * gnat_rm.texi: Regenerate. From-SVN: r260509
2018-05-21[Ada] Minor typo fixesJose Ruiz1-3/+3
2018-05-21 Jose Ruiz <ruiz@adacore.com> gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb, libgnarl/s-tassta.adb: Minor typo fixes From-SVN: r260462
2018-05-21[Ada] Placement of pragma Elaboration_ChecksHristian Kirtchev1-11/+16
This patch modifies the semantics of pragma Elaboration_Checks. The pragma was intended to be a configuration pragma, however its placement was never verified until now. The pragma may appear in the following contexts: * Configuration pragmas file * Prior to the context clauses of a compilation unit's initial declaration Any other placement of the pragma will result in a warning and the effects of the offending pragma will be ignored. ------------ -- Source -- ------------ -- elab_checks_1.adc pragma Elaboration_Checks (Dynamic); -- elab_checks_2.adc pragma Elaboration_Checks (Dynamic); pragma Elaboration_Checks (Static); -- Error -- pack_1.ads pragma Elaboration_Checks (Static); -- OK package Pack_1 is end Pack_1; -- pack_2.ads pragma Elaboration_Checks (Static); -- OK pragma Elaboration_Checks (Static); -- Error package Pack_2 is end Pack_2; -- pack_3.ads package Pack_3 is procedure Proc; end Pack_3; -- pack_3.adb pragma Elaboration_Checks (Static); -- Error package body Pack_3 is procedure Proc is begin null; end Proc; end Pack_3; -- pack_4.ads package Pack_4 is procedure Proc; end Pack_4; -- pack_4.adb package body Pack_4 is procedure Proc is separate; end Pack_4; -- pack_4-proc.adb pragma Elaboration_Checks (Static); -- Error separate (Pack_4) procedure Proc is begin null; end Proc; -- gen.ads generic with function Called_At_Elaboration return Boolean; package Gen is procedure Proc; end Gen; -- gen.adb package body Gen is procedure Proc is Obj : constant Boolean := Called_At_Elaboration; begin null; end Proc; begin Proc; end Gen; -- abe_static.ads pragma Elaboration_Checks (Static); with Gen; package ABE_Static is function ABE return Boolean; package Inst_1 is new Gen (ABE); end ABE_Static; -- abe_static.adb package body ABE_Static is package Inst_2 is new Gen (ABE); package Subunit is end Subunit; package body Subunit is separate; function ABE return Boolean is begin return True; end ABE; end ABE_Static; -- abe_static-subunit.adb separate (ABE_Static) package body Subunit is package Inst_3 is new Gen (ABE); package Nested_Subunit is end Nested_Subunit; package body Nested_Subunit is separate; end Subunit; -- abe_static-subunit-nested_subunit.adb separate (ABE_Static.Subunit) package body Nested_Subunit is package Inst_4 is new Gen (ABE); end Nested_Subunit; -- abe_static_main.adb with ABE_Static; procedure ABE_Static_Main is begin null; end ABE_Static_Main; ---------------------------- -- Compilation and output -- ---------------------------- $ gcc -c pack_1.ads -gnatec=elab_checks_1.adc $ gcc -c pack_1.ads -gnatec=elab_checks_2.adc $ gcc -c pack_1.ads $ gcc -c pack_2.ads $ gcc -c pack_3.adb $ gcc -c pack_4.adb $ gnatmake -q -gnatE abe_static_main.adb elab_checks_2.adc:2:01: pragma "Elaboration_Checks" duplicates pragma declared at line 1 pack_2.ads:2:01: pragma "Elaboration_Checks" duplicates pragma declared at line 1 pack_3.adb:1:01: warning: effects of pragma "Elaboration_Checks" are ignored pack_3.adb:1:01: warning: place pragma on initial declaration of library unit pack_4-proc.adb:1:01: warning: effects of pragma "Elaboration_Checks" are ignored pack_4-proc.adb:1:01: warning: place pragma on initial declaration of library unit abe_static.adb:2:04: warning: in instantiation at gen.adb:3 abe_static.adb:2:04: warning: cannot call "ABE" before body seen abe_static.adb:2:04: warning: Program_Error may be raised at run time abe_static.adb:2:04: warning: body of unit "ABE_Static" elaborated abe_static.adb:2:04: warning: procedure "Proc" called at gen.adb:6, instance at line 2 abe_static.adb:2:04: warning: function "ABE" called at gen.adb:3, instance at line 2 abe_static.ads:8:04: warning: in instantiation at gen.adb:3 abe_static.ads:8:04: warning: cannot call "ABE" before body seen abe_static.ads:8:04: warning: Program_Error may be raised at run time abe_static.ads:8:04: warning: spec of unit "ABE_Static" elaborated abe_static.ads:8:04: warning: procedure "Proc" called at gen.adb:6, instance at line 8 abe_static.ads:8:04: warning: function "ABE" called at gen.adb:3, instance at line 8 abe_static-subunit.adb:4:04: warning: in instantiation at gen.adb:3 abe_static-subunit.adb:4:04: warning: cannot call "ABE" before body seen abe_static-subunit.adb:4:04: warning: Program_Error may be raised at run time abe_static-subunit.adb:4:04: warning: body of unit "ABE_Static" elaborated abe_static-subunit.adb:4:04: warning: procedure "Proc" called at gen.adb:6, instance at line 4 abe_static-subunit.adb:4:04: warning: function "ABE" called at gen.adb:3, instance at line 4 abe_static-subunit-nested_subunit.adb:4:04: warning: in instantiation at gen.adb:3 abe_static-subunit-nested_subunit.adb:4:04: warning: cannot call "ABE" before body seen abe_static-subunit-nested_subunit.adb:4:04: warning: Program_Error may be raised at run time abe_static-subunit-nested_subunit.adb:4:04: warning: body of unit "ABE_Static" elaborated abe_static-subunit-nested_subunit.adb:4:04: warning: procedure "Proc" called at gen.adb:6, instance at line 4 abe_static-subunit-nested_subunit.adb:4:04: warning: function "ABE" called at gen.adb:3, instance at line 4 warning: "abe_static_main.adb" has dynamic elaboration checks and with's warning: "abe_static.ads" which has static elaboration checks 2018-05-21 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration model of the compilation unit spec, if any. * sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration model of the compilation unit spec, if any. * sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the parent compilation unit spec, if any. * sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration model of the main unit. (Is_Same_Unit): The routine now uses Unit_Entity. (Is_Subunit): Removed. (Normalize_Unit): Removed. (Unit_Entity): New routine. * sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma Elaboration_Checks. The analysis now ensures that the pragma appears at the configuration level, and on the initial declaration of a unit. Other placements are either flagged as illegal, or ignored. (Check_Duplicate_Elaboration_Checks_Pragma): New routine. (Ignore_Elaboration_Checks_Pragma): New routine. * sem_util.adb (Install_Elaboration_Model): New routine. * sem_util.ads (Install_Elaboration_Model): New routine. * doc/gnat_rm/implementation_defined_pragmas.rst: Update the documentation of pragma Elaboration_Checks. * gnat_rm.texi: Regenerate. From-SVN: r260457
2018-03-23re PR ada/85007 (-b flag to gnatlink not recognized)Eric Botcazou1-8/+0
PR ada/85007 * gnatlink.adb (Gnatlink): Remove handling of -b switch. * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink): Remove documentation of -b switch. From-SVN: r258828
2018-01-11[Ada] Improve documentation of xml2gnatBob Duff1-5/+19
2018-01-11 Bob Duff <duff@adacore.com> gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of xml2gnat. From-SVN: r256509
2018-01-11[Ada] Add Sphinx option -W to treat warnings as errorsBen Brosgol1-1/+1
2018-01-11 Ben Brosgol <brosgol@adacore.com> gcc/ada/ * doc/Makefile: Add Sphinx option -W to treat warnings as errors. From-SVN: r256506
2018-01-11[Ada] Minor type/wording correctionsBen Brosgol1-3/+3
2018-01-11 Ben Brosgol <brosgol@adacore.com> gcc/ada/ * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording corrections. * gnat_rm.texi: Regenerate. From-SVN: r256505
2018-01-11[Ada] Update gnatpp documentation after engine changeBob Duff2-249/+441
2018-01-11 Bob Duff <duff@adacore.com> gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation to match what the Libadalang-based version does. * doc/gnat_ugn/about_this_guide.rst: Update reference. From-SVN: r256500
2018-01-11[Ada] Update description of restriction SPARK_05 with SPARK 2014Yannick Moy1-14/+23
2018-01-11 Yannick Moy <moy@adacore.com> gcc/ada/ * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst: Update description of restriction SPARK_05 with SPARK 2014. * gnat_rm.texi: Regenerate. From-SVN: r256498
2018-01-11[Ada] Minor layout fix in documentation sourcesVasiliy Fofanov1-9/+6
2018-01-11 Vasiliy Fofanov <fofanov@adacore.com> gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout. From-SVN: r256497
2017-12-15exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Use Component_Size of the ↵Pierre-Marie de Rodat1-0/+1
innermost array instead of Esize of its component... gcc/ada/ 2017-12-15 Eric Botcazou <ebotcazou@adacore.com> * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Use Component_Size of the innermost array instead of Esize of its component type to exclude inappropriate array types, including packed array types. 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Input_Item): Allow concurrent types to appear within the input list of Initializes. Remove the uses of Input_OK. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_In): Do not replace a membership test on a scalar type with a validity test when the membership appears in a predicate expression, to prevent a spurious error when predicate is specified static. * sem_ch13.adb (Build_Predicate_Functions): Add warning if a static predicate, after constant-folding, reduces to True and is this redundant. * par-ch4.adb: Typo fixes and minor reformattings. 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * sem_elab.adb (Ensure_Prior_Elaboration_Static): Mark the generated with clause as being implicit for an instantiation in order to circumvent an issue with 'W' and 'Z' line encodings in ALI files. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Is_Potentially_Unevaluated): Detect further cases of misuse of 'Old that appear within an expression that is potentially unevaluated, when the prefix of the attribute does not statically designate an object (e.g. a function call). 2017-12-15 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Conformking_Types): Two incomplete types are conforming when one of them is used as a generic actual, but only within an instantiation. * einfo.ads: Clarify use of flag Used_As_Generic_Actual. 2017-12-15 Justin Squirek <squirek@adacore.com> * sem_attr.adb (Resolve_Attribute): Modify check for aliased view on prefix to use the prefix's original node to avoid looking at expanded conversions for certain array types. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Membership_Op): Add warning on a membership operation on a scalar type for which there is a user-defined equality operator. 2017-12-15 Yannick Moy <moy@adacore.com> * doc/gnat_rm/implementation_defined_pragmas.rst: Add Ghost assertion policy. gcc/testsuite/ 2017-12-15 Justin Squirek <squirek@adacore.com> * gnat.dg/aliasing4.adb: New testcase. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * gnat.dg/incomplete6.adb, gnat.dg/incomplete6.ads: New testcase. 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * gnat.dg/initializes.ads, gnat.dg/initializes.adb: New testcase. 2017-12-15 Eric Botcazou <ebotcazou@adacore.com> * gnat.dg/component_size.adb: New testcase. From-SVN: r255695
2017-12-15gnat_and_program_execution.rst: Update section "Dynamic Stack Usage ↵Pierre-Marie de Rodat1-3/+12
Analysis" to include more details about... gcc/ada/ 2017-12-15 Patrick Bernardi <bernardi@adacore.com> * doc/gnat_ugn/gnat_and_program_execution.rst: Update section "Dynamic Stack Usage Analysis" to include more details about GNAT_STACK_LIMIT. 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * exp_util.adb (Add_Own_DIC): Ensure that the expression of the pragma is available (Is_Verifiable_DIC_Pragma): Moved from Sem_Util. * sem_util.adb (Has_Full_Default_Initialization): Has_Fully_Default_Initializing_DIC_Pragma is now used to determine whether a type has full default initialization due to pragma Default_Initial_Condition. (Has_Fully_Default_Initializing_DIC_Pragma): New routine. (Is_Verifiable_DIC_Pragma): Moved to Exp_Util. * sem_util.ads (Has_Fully_Default_Initializing_DIC_Pragma): New routine. (Is_Verifiable_DIC_Pragma): Moved to Exp_Util. * sem_warn.adb (Is_OK_Fully_Initialized): Has_Fully_Default_Initializing_DIC_Pragma is now used to determine whether a type has full default initialization due to pragma Default_Initial_Condition. 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Match_Constituent): Do not quietly accept constants as suitable constituents. * exp_util.adb: Minor reformatting. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * exp_aggr.adb (In_Place_Assign_OK): Extend the predicate to recognize an array aggregate in an allocator, when the designated type is unconstrained and the upper bound of the aggregate belongs to the base type of the index. 2017-12-15 Bob Duff <duff@adacore.com> * exp_ch6.adb (Expand_N_Extended_Return_Statement, Expand_Simple_Function_Return): Assert that the b-i-p-ness of the caller and callee match. Otherwise, we would need some substantial changes to allow b-i-p calls non-b-i-p, and vice versa. gcc/testsuite/ 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * gnat.dg/dflt_init_cond.adb, gnat.dg/dflt_init_cond_pkg.ads: New testcase. From-SVN: r255685
2017-12-15exp_unst.adb (Unnest_Subprograms): Nothing to do if the main unit is a ↵Pierre-Marie de Rodat1-27/+8
generic package body. gcc/ada/ 2017-12-15 Ed Schonberg <schonberg@adacore.com> * exp_unst.adb (Unnest_Subprograms): Nothing to do if the main unit is a generic package body. Unnesting is only an issue when generating code, and if the main unit is generic then nested instance bodies have not been created and analyzed, and unnesting will crash in the absence of those bodies, 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * inline.adb (Add_Inlined_Body): Do not add a function which is completed by an expression function defined in the same context as the initial declaration because the completing body is not in a package body. (Is_Non_Loading_Expression_Function): New routine. 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * debug.adb: Move the functionality of -gnatdL to -gnatd_i. Restore the behavior of -gnatdL from before revision 255412. * sem_elab.adb: Update the section of compiler switches. (Build_Call_Marker): Do not create a marker for a call which originates from an expanded spec or body of an instantiated gener, does not invoke a generic formal subprogram, the target is external to the instance, and -gnatdL is in effect. (In_External_Context): New routine. (Process_Conditional_ABE_Activation_Impl): Update the uses of -gnatdL and associated flag. (Process_Conditional_ABE_Call): Update the uses of -gnatdL and associated flag. * switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch -gnatd_i. * exp_unst.adb: Minor typo fixes and edits. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Possible_Freeze): Do not set Delayed_Freeze on an subprogram instantiation, now that the enclosing wrapper package carries an explicit freeze node. THis prevents freeze nodes for the subprogram for appearing in the wrong scope. This is relevant when the generic subprogram has a private or incomplete formal type and the instance appears within a package that declares the actual type for the instantiation, and that type has itself a delayed freeze. 2017-12-15 Patrick Bernardi <bernardi@adacore.com> * doc/gnat_ugn/gnat_and_program_execution.rst: Removed references to the environment variable GNAT_STACK_LIMIT from the Stack Overflow Checking section as it is no longer used by any of our supported targets. gcc/testsuite/ 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * gnat.dg/expr_func_main.adb, gnat.dg/expr_func_pkg.ads, gnat.dg/expr_func_pkg.adb: New testcase. 2017-12-15 Hristian Kirtchev <kirtchev@adacore.com> * gnat.dg/abe_pkg.adb, gnat.dg/abe_pkg.ads: New testcase. 2017-12-15 Ed Schonberg <schonberg@adacore.com> * gnat.dg/subp_inst.adb, gnat.dg/subp_inst_pkg.adb, gnat.dg/subp_inst_pkg.ads: New testcase. From-SVN: r255683
2017-12-05sem_util.adb (Contains_Refined_State): Remove.Pierre-Marie de Rodat1-0/+23
gcc/ada/ 2017-12-05 Piotr Trojanek <trojanek@adacore.com> * sem_util.adb (Contains_Refined_State): Remove. 2017-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications, case Predicate): A predicate cannot apply to a formal type. 2017-12-05 Arnaud Charlet <charlet@adacore.com> * exp_unst.ads: Fix typos. 2017-12-05 Jerome Lambourg <lambourg@adacore.com> * libgnarl/s-taprop__qnx.adb: Better detect priority ceiling bug in QNX. At startup, the first mutex created has a non-zero ceiling priority whatever its actual policy. This makes some tests fail (c940013 for example). 2017-12-05 Bob Duff <duff@adacore.com> * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Call Expand_Cleanup_Actions for N_Extended_Return_Statement. * exp_ch7.adb (Expand_Cleanup_Actions): Handle N_Extended_Return_Statement by transforming the statements into a block, and (indirectly) calling Expand_Cleanup_Actions on the block. It's too hard for Expand_Cleanup_Actions to operate directly on the N_Extended_Return_Statement, because it has a different structure than the other node kinds that Expand_Cleanup_Actions. * exp_util.adb (Requires_Cleanup_Actions): Add support for N_Extended_Return_Statement. Change "when others => return False;" to "when others => raise ...;" so it's clear what nodes this function handles. Use named notation where appropriate. * exp_util.ads: Mark incorrect comment with ???. 2017-12-05 Javier Miranda <miranda@adacore.com> * exp_ch9.adb (Install_Private_Data_Declarations): Add missing Debug_Info_Needed decoration of internally generated discriminal renaming declaration. 2017-12-05 Arnaud Charlet <charlet@adacore.com> * exp_unst.adb (Unnest_Subprogram): Add handling of 'Access on nested subprograms. 2017-12-05 Sergey Rybin <rybin@adacore.com> * doc/gnat_ugn/gnat_utility_programs.rst: Add description of '--ignore' option for gnatmetric, gnatpp, gnat2xml, and gnattest. 2017-12-05 Piotr Trojanek <trojanek@adacore.com> * sem_util.adb (Contains_Refined_State): Remove. 2017-12-05 Piotr Trojanek <trojanek@adacore.com> * rtsfind.ads: Add new enumeration literals: RE_Clock_Time (for Ada.Real_Time.Clock_Time) and RO_CA_Clock_Time (for Ada.Calendar.Clock_Time). 2017-12-05 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Is_Private_Overriding): If the candidate private subprogram is overloaded, scan the list of homonyms in the same scope, to find the inherited operation that may be overridden by the candidate. * exp_ch11.adb, exp_ch7.adb: Minor reformatting. 2017-12-05 Bob Duff <duff@adacore.com> * exp_ch6.adb (Expand_N_Extended_Return_Statement): If the Init_Assignment is rewritten, we need to set Assignment_OK on the new node. Otherwise, we will get spurious errors when initializing via assignment statement. gcc/testsuite/ 2017-12-05 Ed Schonberg <schonberg@adacore.com> * gnat.dg/private_overriding.adb: New testcase. From-SVN: r255414
2017-12-05[multiple changes]Pierre-Marie de Rodat2-5/+23
2017-12-05 Hristian Kirtchev <kirtchev@adacore.com> * sem_elab.adb: Update the terminology and switch sections. (Check_SPARK_Model_In_Effect): New routine. (Check_SPARK_Scenario): Verify the model in effect for SPARK. (Process_Conditional_ABE_Call_SPARK): Verify the model in effect for SPARK. (Process_Conditional_ABE_Instantiation_SPARK): Verify the model in effect for SPARK. (Process_Conditional_ABE_Variable_Assignment_SPARK): Verify the model in effect for SPARK. 2017-12-05 Nicolas Setton <setton@adacore.com> * terminals.c (__gnat_setup_child_communication): As documented, __gnat_setup_child_communication should not terminate - it is intended to be used as the child process of a call to fork(). However, execvp might actually return in some cases, for instance when attempting to run a 32-bit binary on a 64-bit Linux distribution when the compatibility packages are not installed. In these cases, exit the program to conform to the documentation. 2017-12-05 Olivier Hainque <hainque@adacore.com> * libgnat/s-tsmona.adb: Fix for oversight in the tsmona interface update. 2017-12-05 Gary Dismukes <dismukes@adacore.com> * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Minor typo fix and reformatting. * gnat_ugn.texi: Regenerate. 2017-12-05 Olivier Hainque <hainque@adacore.com> * sem_util.adb (Set_Convention): Always clear Can_Use_Internal_Rep on access to subprogram types with foreign convention. 2017-12-05 Yannick Moy <moy@adacore.com> * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix User's Guide description of default settings of warnings. From-SVN: r255413
2017-12-05[multiple changes]Pierre-Marie de Rodat3-174/+87
2017-12-05 Olivier Hainque <hainque@adacore.com> * s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end of section. Add comments explaining the rationale of the computation. 2017-12-05 Bob Duff <duff@adacore.com> * exp_ch11.adb: Minor refactoring. 2017-12-05 Hristian Kirtchev <kirtchev@adacore.com> * debug.adb: Add debug switches d_a, d_e, and d_p, along with documentation. (Set_Underscored_Debug_Flag): New routine. * debug.ads: Add the flags for all underscore switches. (Set_Underscored_Debug_Flag): New routine. * einfo.adb: Flag303 is now Suppress_Elaboration_Warnings. (Suppress_Elaboration_Warnings): New routine. (Set_Suppress_Elaboration_Warnings): New routine. (Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings. * einfo.ads: Add new flag Suppress_Elaboration_Warnings. (Suppress_Elaboration_Warnings): New routine along with pragma Inline. (Set_Suppress_Elaboration_Warnings): New routine along with pragma Inline. * exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the legacy elaboration model. (Default_Initialize_Object): Restore the behavior of the legacy elaboration model. * exp_ch9.adb: Add with and use clause for Sem_Elab. (Build_Task_Activation_Call): Restore the behavior of the legacy elaboration model. * frontend.adb (Frontend): Restore the behavior of the legacy elaboration model. * opt.ads: Add new flags Legacy_Elaboration_Checks and Relaxed_Elaboration_Checks, along with documentation. * sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the legacy elaboration model. * sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy elaboration model. * sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of the legacy elaboration model. * sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy elaboration model. * sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior of the legacy elaboration model. (Analyze_Package_Instantiation): Restore the behavior of the legacy elaboration model. (Analyze_Subprogram_Instantiation): Restore the behavior of the legacy elaboration model. * sem_elab.adb: Update the documentation of the Processing phase. Update the documentation on elaboration-related compilation switches. Update the documentation on adding a new target. Add Processing_Attributes which represent the state of the Processing phase. Resurrect the previous elaboration model as "legacy elaboration model". (Build_Call_Marker): This routine does not function when the legacy elaboration model is in effect. Do not consider entry calls and requeue statements when debug flag d_e is in effect. Do not consider calls to subprograms which verify the runtime semantics of certain assertion pragmas when debug flag d_p is in effect. (Build_Variable_Reference_Marker): This routine does not function when the legacy elaboration model is in effect. (Check_Elaboration_Scenarios): This routine does not function when the legacy elaboration model is in effect. (Ensure_Prior_Elaboration): The various flags have now been replaced with a state. Do not generate implicit Elaborate[_All] pragmas when their creation has been suppressed. (Ensure_Prior_Elaboration_Static): The with clause is marked based on the requested pragma, not on the nature of the scenario. (In_External_Context): Removed. (Is_Assertion_Pragma_Target): New routine. (Is_Potential_Scenario): Stop the traversal of a task body when reaching an accept or select statement, and debug switch d_a is in effect. (Kill_Elaboration_Scenario): This routine does not function when the legacy elaboration model is in effect. (Process_Activation_Generic): The various flags have now been replaced with a state. (Process_Conditional_ABE): The various flags have now been replaced with a state. (Process_Conditional_ABE_Access): The various flags have now been replaced with a state. (Process_Conditional_ABE_Activation_Impl): The various flags have now been replaced with a state. Do not process an activation call which activates a task whose type is defined in an external instance, and debug switch dL is in effect. Suppress the generation of implicit Elaborate[_All] pragmas once a conditional ABE check has been installed. (Process_Conditional_ABE_Call): The various flags have now been replaced with a state. Do not process a call which invokes a subprogram defined in an external instance, and debug switch dL is in effect. (Process_Conditional_ABE_Call_Ada): The various flags have now been replaced with a state. Suppress the generation of implicit Elaborate[_All] pragmas once a conditional ABE check has been installed. (Process_Conditional_ABE_Call_SPARK): The various flags have now been replaced with a state. (Process_Conditional_ABE_Instantiation): The various flags have now been replaced with a state. (Process_Conditional_ABE_Instantiation_Ada): The various flags have now been replaced with a state. Suppress the generation of implicit Elaborate[_All] pragmas once a conditional ABE check has been installed. (Process_Conditional_ABE_Instantiation_SPARK): The various flags have now been replaced with a state. (Process_Guaranteed_ABE_Activation_Impl): The various flags have now been replaced with a state. (Process_Single_Activation): The various flags have now been replaced with a state. (Record_Elaboration_Scenario): This routine does not function when the legacy elaboration model is in effect. (Traverse_Body): The various flags have now been replaced with a state. * sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy elaboration model". * sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy elaboration model. * sem_res.adb (Resolve_Call): Restore the behavior of the legacy elaboration model. (Resolve_Entity_Name): Restore the behavior of the legacy elaboration model. * sem_util.adb (Mark_Elaboration_Attributes): This routine does not function when the legacy elaboration model is in effect. * sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check. (No_Elaboration_Check): New routine. (Set_Is_Known_Guaranteed_ABE): Update the assertion check. (Set_No_Elaboration_Check): New routine. * sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE along with occurrences in nodes. Add new flag No_Elaboration_Check along with occurrences in nodes. * switch-c.adb (Scan_Front_End_Switches): Add processing for debug switches with underscores. Add processing for switches -gnatH and -gnatJ. * usage.adb (Usage): Add output for switches -gnatH and -gnatJ. * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the documentation to include the legacy and relaxed elaboration models. * gnat_ugn.texi: Regenerate. 2017-12-05 Arnaud Charlet <charlet@adacore.com> * doc/gnat_ugn/platform_specific_information.rst: Minor edit. Improve doc on required packages for linux 32bits. 2017-12-05 Doug Rupp <rupp@adacore.com> * tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit. 2017-12-05 Javier Miranda <miranda@adacore.com> * checks.adb (Generate_Range_Check): Force evaluation of the node in more cases. This patch was written to improve the code generated by the CCG compiler but it is enabled for all targets since double evaluation is always a potential source of inefficiency. 2017-12-05 Gary Dismukes <dismukes@adacore.com> * doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete -fdump-xref switch. From-SVN: r255412
2017-11-16[multiple changes]Pierre-Marie de Rodat1-1/+31
2017-11-16 Joel Brobecker <brobecker@adacore.com> * doc/gnat_ugn/gnat_utility_programs.rst: Document the switches available in gnatsymbolize. 2017-11-16 Steve Baird <baird@adacore.com> * debug.adb: Update comment to indicate gnat2scil's use of the -gnatd.7 switch. From-SVN: r254826
2017-11-16[multiple changes]Pierre-Marie de Rodat2-1/+112
2017-11-16 Gary Dismukes <dismukes@adacore.com> * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, sem_ch6.adb, sem_elab.adb: Minor editorial corrections. * gnat_ugn.texi: Regenerate. 2017-11-16 Joel Brobecker <brobecker@adacore.com> * doc/gnat_ugn/gnat_utility_programs.rst (GNAT UGN): Add gnatsymbolize documentation. * gnat_ugn.texi: Regenerate. 2017-11-16 Steve Baird <baird@adacore.com> * sem_ch3.adb (Build_Derived_Record_Type): Replace all uses of "Scope (Parent_Type)" with "Scope (Parent_Base)". From-SVN: r254825
2017-11-16opt.ads: Elaboration warnings are now on by default.Hristian Kirtchev1-4/+45
2017-11-16 Hristian Kirtchev <kirtchev@adacore.com> * opt.ads: Elaboration warnings are now on by default. Add a comment explaining why this is needed. * sem_ch9.adb (Analyze_Requeue): Preserve the status of elaboration warnings. * sem_ch12.adb (Analyze_Package_Instantiation): Preserve the status of elaboration warnings. (Analyze_Subprogram_Instantiation): Preserve the status of elaboration warnings. * sem_elab.adb: Update the structure of Call_Attributes and Instantiation_Attributes. (Build_Call_Marker): Propagate the status of elaboration warnings from the call to the marker. (Extract_Call_Attributes): Extract the status of elaboration warnings. (Extract_Instantiation_Attributes): Extract the status of elaboration warnings. (Process_Conditional_ABE_Activation_Impl): Elaboration diagnostics are now dependent on the status of elaboration warnings. (Process_Conditional_ABE_Call_Ada): Elaboration diagnostics are now dependent on the status of elaboration warnings. (Process_Conditional_ABE_Instantiation_Ada): Elaboration diagnostics are now dependent on the status of elaboration warnings. (Process_Guaranteed_ABE_Activation_Impl): Remove pragma Unreferenced for formal Call_Attrs. Elaboration diagnostics are now dependent on the status of elaboration warnings. (Process_Guaranteed_ABE_Call): Elaboration diagnostics are now dependent on the status of elaboration warnings. (Process_Guaranteed_ABE_Instantiation): Elaboration diagnostics are now dependent on the status of elaboration warnings. * sem_prag.adb (Analyze_Pragma): Remove the unjustified warning concerning pragma Elaborate. * sem_res.adb (Resolve_Call): Preserve the status of elaboration warnings. (Resolve_Entry_Call): Propagate flag Is_Elaboration_Warnings_OK_Node from the procedure call to the entry call. * sem_util.adb (Mark_Elaboration_Attributes): Add formal parameter Warnings. (Mark_Elaboration_Attributes_Node): Preserve the status of elaboration warnings * sem_util.ads (Mark_Elaboration_Attributes): Add formal parameter Warnings. Update the comment on usage. * sinfo.adb (Is_Dispatching_Call): Update to use Flag6. (Is_Elaboration_Warnings_OK_Node): New routine. (Set_Is_Dispatching_Call): Update to use Flag6. (Set_Is_Elaboration_Warnings_OK_Node): New routine. * sinfo.ads: Attribute Is_Dispatching_Call now uses Flag6. Add new attribute Is_Elaboration_Warnings_OK_Node along with occurrences in nodes. (Is_Elaboration_Warnings_OK_Node): New routine along with pragma Inline. (Set_Is_Elaboration_Warnings_OK_Node): New routine along with pragma Inline. * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update various sections to indicate how to suppress elaboration warnings. Document switches -gnatwl and -gnatwL. * gnat_ugn.texi: Regenerate. From-SVN: r254819
2017-11-09[multiple changes]Pierre-Marie de Rodat1-0/+30
2017-11-09 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly the pragma Compile_Time_Error when it appears in a generic package declaration and uses an expanded name to denote the current unit. 2017-11-09 Jerome Lambourg <lambourg@adacore.com> * libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self. * tracebak.c: Add support for tracebacks in QNX. 2017-11-09 Eric Botcazou <ebotcazou@adacore.com> * exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000. 2017-11-09 Yannick Moy <moy@adacore.com> * erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer justification. 2017-11-09 Joel Brobecker <brobecker@adacore.com> * doc/gnat_ugn/platform_specific_information.rst: Document packages needed on GNU/Linux by GNAT. * gnat_ugn.texi: Regenerate. 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com> * contracts.adb (Analyze_Contracts): Remove the three parameter version. This routine now only analyzes contracts and does not perform any freezing actions. (Analyze_Previous_Contracts): Removed. (Freeze_Previous_Contracts): New routine. * contracts.ads (Analyze_Previous_Contracts): Removed. (Freeze_Previous_Contracts): New routine. * sem_ch3.adb (Analyze_Declarations): Analyze the contract of an enclosing package spec regardless of whether the list denotes the visible or private declarations. Fix the removal of partial state refinements when the context is a package spec. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous contracts. * sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts. * sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts. (Analyze_Protected_Body): Freeze previous contracts. (Analyze_Task_Body): Freeze previous contracts. * sem_prag.adb: Comment reformatting. 2017-11-09 Bob Duff <duff@adacore.com> * libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent): Export this so users can use it without importing System.Tasking.Utilities. * libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion that fails when Make_Independent is called on a user task. * libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual capitalization style ((style) bad casing of "Master_of_Task"). From-SVN: r254580
2017-11-09[multiple changes]Pierre-Marie de Rodat1-1/+1
2017-11-09 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of uninitialized variable uncovered by Codepeer. 2017-11-09 Arnaud Charlet <charlet@adacore.com> * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap. 2017-11-09 Javier Miranda <miranda@adacore.com> * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst: (Static_Dispatch_Tables): Minor rewording. * gnat_rm.texi: Regenerate. 2017-11-09 Justin Squirek <squirek@adacore.com> * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of use_clauses within instances. (Use_One_Package): Add condition to check for "hidden" open scopes to avoid skipping over packages that have not been properly installed even though they are visible. 2017-11-09 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a private operation of a protected type, when the type has no visible operations. From-SVN: r254578
2017-11-09[multiple changes]Pierre-Marie de Rodat1-0/+7
2017-11-09 Pascal Obry <obry@adacore.com> * libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle only for foreign threads. We initialize the thread handle only if not yet initialized. This happens in Enter_Task for foreign threads only. But for native threads (Ada tasking) we do want to keep the real handle (from Create_Task) to be able to free the corresponding resources in Finalize_TCB (CloseHandle). 2017-11-09 Yannick Moy <moy@adacore.com> * sem_attr.adb (Analyze_Attribute): Default initialize P_Type, P_Base_Type. (Error_Attr_P): Fix name in pragma No_Return. (Unexpected_Argument): Add pragma No_Return. (Placement_Error): Add pragma No_Return. 2017-11-09 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the dispatch table is statically built. (Make_DT): Declare constant the Interface_Table object associated with an statically built dispatch table. For this purpose the Offset_To_Top value of each interface is computed using the dummy object. * exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing the Offset_To_Top field of secondary dispatch tables when the dispatch table is statically built. (Initialize_Tag): Do not generate calls to Register_Interface_Offset when the dispatch table is statically built. * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst: Document the new GNAT restriction Static_Dispatch_Tables. * gnat_rm.texi: Regenerate. 2017-11-09 Hristian Kirtchev <kirtchev@adacore.com> * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations to avoid a dormant bug. 2017-11-09 Jerome Lambourg <lambourg@adacore.com> * init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0, as such capability is not available on the OS. * link.c: Make sure linker options for QNX are correct. * libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread. * libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings in particular a workaround with locks priority ceiling where a higher priority task is allowed to lock a lower ceiling priority lock. This also fixes the scheduling of FIFO tasks when the priority of a task is lowered. * libgnat/system-qnx-aarch64.ads: Fix priority ranges. 2017-11-09 Yannick Moy <moy@adacore.com> * erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive message. * gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true condition. * namet.adb (Copy_One_Character): Add assumption for static analysis, as knowledge that Hex(2) is in the range 0..255 is too complex for CodePeer. (Finalize): Add assumption for static analysis, as the fact that there are symbols in the table depends on a global invariant at this point in the program. * set_targ.adb (Check_Spaces): Justify CodePeer false positive message. * stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always true. From-SVN: r254573
2017-11-09[multiple changes]Pierre-Marie de Rodat1-1/+1
2017-11-09 Jerome Lambourg <lambourg@adacore.com> * sigtramp-qnx.c: Fix obvious typo. 2017-11-09 Doug Rupp <rupp@adacore.com> * libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting. 2017-11-09 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve): If expression is an entity whose type has implicit dereference, generate reference to it, because no reference is generated for an overloaded entity during analysis, given that its identity may not be known. 2017-11-09 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Expand_Interface_Thunk): Replace substraction of offset-to-top field by addition. (Make_Secondary_DT): Initialize the offset-to-top field with a negative offset. * exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that return a negative offset-to-top value. (Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and Set_Static_Offset_To_Top passing a negative offet-to-top value; initialize also the offset-to-top field with a negative offset. * libgnat/a-tags.adb (Base_Address): Displace the pointer by means of an addition since the offset-to-top field is now a negative value. (Displace): Displace the pointer to the object means of a substraction since it is now a negative value. (Set_Dynamic_Offset_to_top): Displace the pointer to the object by means of a substraction since it is now a negative value. 2017-11-09 Eric Botcazou <ebotcazou@adacore.com> * gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True) before Errout.Output_Messages also in the case of compilation errors. 2017-11-09 Javier Miranda <miranda@adacore.com> * doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at the Class Level): Fix error interfacing with C strings. * gnat_ugn.texi: Regenerate. 2017-11-09 Jerome Lambourg <lambourg@adacore.com> * system-qnx-aarch64.ads: Fix the priority constants. * s-osinte__qnx.ads: Fix constants for handling the locking protocols and scheduling. * s-osinte__qnx.adb: New file , prevents the use of priority 0 that corresponds to an idle priority on QNX. 2017-11-09 Piotr Trojanek <trojanek@adacore.com> * sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in comments. From-SVN: r254566
2017-10-20[multiple changes]Pierre-Marie de Rodat2-14/+6
2017-10-20 Bob Duff <duff@adacore.com> * sinfo.ads: Fix a comment typo. 2017-10-20 Eric Botcazou <ebotcazou@adacore.com> * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-flto): Add warning against usage in conjunction with -gnatn. (-fdump-xref): Delete entry. * doc/gnat_ugn/gnat_utility_programs.rst (--ext): Remove mention of -fdump-xref switch. * gnat_ugn.texi: Regenerate. 2017-10-20 Hristian Kirtchev <kirtchev@adacore.com> * sem_type.adb, exp_util.adb, sem_util.adb, sem_dim.adb, sem_elab.adb: Minor reformatting. From-SVN: r253947
2017-10-20sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to compare ↵Pierre-Marie de Rodat2-7/+13
a dimensioned expression with a literal. gcc/ada/ 2017-10-20 Yannick Moy <moy@adacore.com> * sem_dim.adb (Analyze_Dimension_Binary_Op): Accept with a warning to compare a dimensioned expression with a literal. (Dim_Warning_For_Numeric_Literal): Do not issue a warning for the special value zero. * doc/gnat_ugn/gnat_and_program_execution.rst: Update description of dimensionality system in GNAT. * gnat_ugn.texi: Regenerate. 2017-10-20 Yannick Moy <moy@adacore.com> * sem_ch6.adb (Analyze_Expression_Function.Freeze_Expr_Types): Remove inadequate silencing of errors. * sem_util.adb (Check_Part_Of_Reference): Do not issue an error when checking the subprogram body generated from an expression function, when this is done as part of the preanalysis done on expression functions, as the subprogram body may not yet be attached in the AST. The error if any will be issued later during the analysis of the body. (Is_Aliased_View): Trivial rewrite with Is_Formal_Object. 2017-10-20 Arnaud Charlet <charlet@adacore.com> * sem_ch8.adb (Update_Chain_In_Scope): Add missing [-gnatwu] marker for warning on ineffective use clause. 2017-10-20 Eric Botcazou <ebotcazou@adacore.com> * exp_ch11.ads (Warn_If_No_Local_Raise): Declare. * exp_ch11.adb (Expand_Exception_Handlers): Use Warn_If_No_Local_Raise to issue the warning on the absence of local raise. (Possible_Local_Raise): Do not issue the warning for Call_Markers. (Warn_If_No_Local_Raise): New procedure to issue the warning on the absence of local raise. * sem_elab.adb: Add with and use clauses for Exp_Ch11. (Record_Elaboration_Scenario): Call Possible_Local_Raise in the cases where a scenario could give rise to raising Program_Error. * sem_elab.adb: Typo fixes. * fe.h (Warn_If_No_Local_Raise): Declare. * gcc-interface/gigi.h (get_exception_label): Change return type. * gcc-interface/trans.c (gnu_constraint_error_label_stack): Change to simple vector of Entity_Id. (gnu_storage_error_label_stack): Likewise. (gnu_program_error_label_stack): Likewise. (gigi): Adjust to above changes. (Raise_Error_to_gnu): Likewise. (gnat_to_gnu) <N_Goto_Statement>: Set TREE_USED on the label. (N_Push_Constraint_Error_Label): Push the label onto the stack. (N_Push_Storage_Error_Label): Likewise. (N_Push_Program_Error_Label): Likewise. (N_Pop_Constraint_Error_Label): Pop the label from the stack and issue a warning on the absence of local raise. (N_Pop_Storage_Error_Label): Likewise. (N_Pop_Program_Error_Label): Likewise. (push_exception_label_stack): Delete. (get_exception_label): Change return type to Entity_Id and adjust. * gcc-interface/utils2.c (build_goto_raise): Change type of first parameter to Entity_Id and adjust. Set TREE_USED on the label. (build_call_raise): Adjust calls to get_exception_label and also build_goto_raise. (build_call_raise_column): Likewise. (build_call_raise_range): Likewise. * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.x): Document actual default behavior. 2017-10-20 Piotr Trojanek <trojanek@adacore.com> * einfo.ads: Minor consistent punctuation in comment. All numbered items in the comment of Is_Internal are now terminated with a period. 2017-10-20 Piotr Trojanek <trojanek@adacore.com> * exp_util.adb (Build_Temporary): Mark created temporary entity as internal. 2017-10-20 Piotr Trojanek <trojanek@adacore.com> * sem_type.adb (In_Generic_Actual): Simplified. 2017-10-20 Justin Squirek <squirek@adacore.com> * sem_ch12.adb (Check_Formal_Package_Instance): Add sanity check to verify a renaming exists for a generic formal before comparing it to the actual as defaulted formals will not have a renamed_object. 2017-10-20 Javier Miranda <miranda@adacore.com> * exp_ch6.adb (Replace_Returns): Fix wrong management of N_Block_Statement nodes. gcc/testsuite/ 2017-10-20 Justin Squirek <squirek@adacore.com> * gnat.dg/default_pkg_actual.adb, gnat.dg/default_pkg_actual2.adb: New testcases. From-SVN: r253945
2017-10-14[multiple changes]Pierre-Marie de Rodat1-8/+54
2017-10-14 Eric Botcazou <ebotcazou@adacore.com> * layout.ads (Set_Elem_Alignment): Add Align parameter defaulted to 0. * layout.adb (Set_Elem_Alignment): Likewise. Use M name as maximum alignment for consistency. If Align is non-zero, use the minimum of Align and M for the alignment. * cstand.adb (Build_Float_Type): Use Set_Elem_Alignment instead of setting the alignment directly. 2017-10-14 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Analyze_Pragma, case Check): Defer evaluation of the optional string in an Assert pragma until the expansion of the pragma has rewritten it as a conditional statement, so that the string argument is only evaluaed if the assertion fails. This is mandated by RM 11.4.2. 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com> * debug.adb: Switch -gnatd.v and associated flag are now used to enforce the SPARK rules for elaboration in SPARK code. * sem_elab.adb: Describe switch -gnatd.v. (Process_Call): Verify the SPARK rules only when -gnatd.v is in effect. (Process_Instantiation): Verify the SPARK rules only when -gnatd.v is in effect. (Process_Variable_Assignment): Clarify why variable assignments are processed reglardless of whether -gnatd.v is in effect. * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the sections on elaboration code and compilation switches. * gnat_ugn.texi: Regenerate. 2017-10-14 Gary Dismukes <dismukes@adacore.com> * exp_util.adb, freeze.adb, sem_aggr.adb, sem_util.ads, sem_util.adb, sem_warn.adb: Minor reformattings. From-SVN: r253757
2017-10-14[multiple changes]Pierre-Marie de Rodat1-5/+9
2017-10-14 Ed Schonberg <schonberg@adacore.com> * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation for reverse iteration over formal containers. * gnat_rm.texi: Regenerate. 2017-10-14 Hristian Kirtchev <kirtchev@adacore.com> * sem_elab.adb (Ensure_Dynamic_Prior_Elaboration): Renamed to Ensure_Prior_Elaboration_Dynamic for consistency reasons. (Ensure_Static_Prior_Elaboration): Renamed to Ensure_Prior_Elaboration_Static for consistency reasons. (Info_Variable_Reference): Renamed to Info_Variable_Read in order to reflect its new purpose. (Is_Initialized): New routine. (Is_Suitable_Variable_Reference): Renamed to Is_Suitable_Variable_Read in order to reflect its new purpose. (Is_Variable_Read): New routine. (Output_Variable_Reference): Renamed to Output_Variable_Read in order to reflect its new purpose. (Process_Variable_Assignment): This routine now acts as a top level dispatcher for variable assignments. (Process_Variable_Assignment_Ada): New routine. (Process_Variable_Assignment_SPARK): New routine. (Process_Variable_Reference): Renamed to Process_Variable_Read in order to reflects its new purpose. A reference to a variable is now suitable for ABE processing only when it is a read. The logic in the routine now reflects the latest SPARK elaboration rules. 2017-10-14 Justin Squirek <squirek@adacore.com> * sem_ch8.adb (Analyze_Subprogram_Renaming): Modify condition that triggers marking on formal subprograms. 2017-10-14 Javier Miranda <miranda@adacore.com> * checks.adb (Ensure_Valid): Do not skip adding the validity check on renamings of objects that come from the sources. 2017-10-14 Eric Botcazou <ebotcazou@adacore.com> * cstand.adb (Build_Float_Type): Move down Siz parameter, add Align parameter and set the alignment of the type to Align. (Copy_Float_Type): Adjust call to Build_Float_Type. (Register_Float_Type): Add pragma Unreferenced for Precision. Adjust call to Build_Float_Type and do not set RM_Size and Alignment. From-SVN: r253756
2017-10-09[multiple changes]Pierre-Marie de Rodat1-0/+1
2017-10-09 Hristian Kirtchev <kirtchev@adacore.com> * sem_unit.adb (Find_Enclosing_Scope): Do not treat a block statement as a scoping construct when it is byproduct of exception handling. 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com> * sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of semantic field Target of node N_Call_Marker. 2017-10-09 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Allocator): Reject properly an allocator that attempts to copy a limited value, when the allocator is the expression in an expression function. 2017-10-09 Joel Brobecker <brobecker@adacore.com> * doc/share/conf.py: Tell the style checker that this is a Python fragment, and therefore that pyflakes should not be run to validate this file. 2017-10-09 Eric Botcazou <ebotcazou@adacore.com> * einfo.ads (Is_Boolean_Type): Add pragma Inline. (Is_Entity_Name): Likewise. (Is_String_Type): Likewise. * sem_type.adb (Full_View_Covers): Do not test Is_Private_Type here and remove useless comparisons on the base types. (Covers): Use simple tests for Standard_Void_Type. Move up cheap tests on T2. Always test Is_Private_Type before Full_View_Covers. 2017-10-09 Bob Duff <duff@adacore.com> * exp_ch4.adb: Minor refactoring. From-SVN: r253568
2017-10-09[multiple changes]Pierre-Marie de Rodat1-1647/+1552
2017-10-09 Bob Duff <duff@adacore.com> * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Use Defining_Identifier (Obj_Decl) in two places, because it might have changed. * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Deal with cases involving 'Input on (not visibly) derived types. 2017-10-09 Hristian Kirtchev <kirtchev@adacore.com> * atree.adb: Add new soft link Rewriting_Proc. (Rewrite): Invoke the subprogram attached to the rewriting soft link. (Set_Rewriting_Proc): New routine. * attree.ads: Add new access-to-subprogram type Rewrite_Proc. (Set_Rewriting_Proc): New routine. * checks.adb (Install_Primitive_Elaboration_Check): Use 'E' character for *E*laboration flag to maintain consistency with other elaboration flag generating subprograms. * debug.adb: Document the new usage of flag -gnatdL. * einfo.adb: Node19 is now used as Receiving_Entry. Node39 is now used as Protected_Subprogram. Flag148 is now used as Is_Elaboration_Checks_OK_Id. Flag302 is now used as Is_Initial_Condition_Procedure. (Is_Elaboration_Checks_OK_Id): New routine. (Is_Initial_Condition_Procedure): New routine. (Protected_Subprogram): New routine. (Receiving_Entry): New routine. (SPARK_Pragma): Update assertion. (SPARK_Pragma_Inherited): Update assertion. (Suppress_Elaboration_Warnings): Removed. (Set_Is_Elaboration_Checks_OK_Id): New routine. (Set_Is_Initial_Condition_Procedure): New routine. (Set_Protected_Subprogram): New routine. (Set_Receiving_Entry): New routine. (Set_SPARK_Pragma): Update assertion. (Set_SPARK_Pragma_Inherited): Update assertion. (Write_Entity_Flags): Update the output for Flag148 and Flag302. (Write_Field19_Name): Add output for Receiving_Entry. (Write_Field39_Name): Add output for Protected_Subprogram. (Write_Field40_Name): Update the output for SPARK_Pragma. * einfo.ads: New attributes Is_Elaboration_Checks_OK_Id, Is_Initial_Condition_Procedure, Protected_Subprogram, Receiving_Entry. Remove attribute Suppress_Elaboration_Warnings. Update the stricture of various entities. (Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline. (Is_Initial_Condition_Procedure): New routine along with pragma Inline. (Protected_Subprogram): New routine along with pragma Inline. (Receiving_Entry): New routine along with pragma Inline. (Suppress_Elaboration_Warnings): Removed. (Set_Is_Elaboration_Checks_OK_Id): New routine along with pragma Inline. (Set_Is_Initial_Condition_Procedure): New routine along with pragma Inline. (Set_Protected_Subprogram): New routine along with pragma Inline. (Set_Receiving_Entry): New routine along with pragma Inline. (Set_Suppress_Elaboration_Warnings): Removed. * exp_ch3.adb (Build_Init_Procedure): Use name _Finalizer to maintain consistency with other finalizer generating subprograms. (Default_Initialize_Object): Mark the block which wraps the call to finalize as being part of initialization. * exp_ch7.adb (Expand_N_Package_Declaration): Directly expand pragma Initial_Condition. (Expand_N_Package_Body): Directly expand pragma Initial_Condition. (Next_Suitable_Statement): Update the comment on usage. Skip over call markers generated by the ABE mechanism. * exp_ch9.adb (Activation_Call_Loc): New routine. (Add_Accept): Link the accept procedure to the original entry. (Build_Protected_Sub_Specification): Link the protected or unprotected version to the original subprogram. (Build_Task_Activation_Call): Code cleanup. Use a source location which is very close to the "begin" or "end" keywords when generating the activation call. * exp_prag.adb (Expand_Pragma_Initial_Condition): Reimplemented. * exp_spark.adb (Expand_SPARK): Use Expand_SPARK_N_Loop_Statement to process loops. (Expand_SPARK_N_Loop_Statement): New routine. (Expand_SPARK_N_Object_Declaration): Code cleanup. Partially insert the call to the Default_Initial_Condition procedure. (Expand_SPARK_Op_Ne): Renamed to Expand_SPARK_N_Op_Ne. * exp_util.adb (Build_DIC_Procedure_Body): Capture the SPARK_Mode in effect. (Build_DIC_Procedure_Declaration): Capture the SPARK_Mode in effect. (Insert_Actions): Add processing for N_Call_Marker. (Kill_Dead_Code): Explicitly kill an elaboration scenario. * exp_util.ads (Make_Invariant_Call): Update the comment on usage. * frontend.adb: Initialize Sem_Elab. Process all saved top level elaboration scenarios for ABE issues. * gcc-interface/trans.c (gnat_to_gnu): Add processing for N_Call_Marker nodes. * lib.adb (Earlier_In_Extended_Unit): New variant. * sem.adb (Analyze): Ignore N_Call_Marker nodes. (Preanalysis_Active): New routine. * sem.ads (Preanalysis_Active): New routine. * sem_attr.adb (Analyze_Access_Attribute): Save certain elaboration-related attributes. Save the scenario for ABE processing. * sem_ch3.adb (Analyze_Object_Declaration): Save the SPARK mode in effect. Save certain elaboration-related attributes. * sem_ch5.adb (Analyze_Assignment): Save certain elaboration-related attributes. Save the scenario for ABE processing. * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Save the SPARK mode in effect. Save certain elaboration-related attributes. (Analyze_Subprogram_Body_Helper): Skip N_Call_Marker nodes when locating the first real statement. (Analyze_Subprogram_Declaration): Save the SPARK mode in effect. Save certain elaboration-related attributes. * sem_ch7.adb (Analyze_Package_Declaration): Do not suppress elaboration warnings. * sem_ch8.adb (Attribute_Renaming): Mark a subprogram body which was generated for purposes of wrapping an attribute used as a generic actual. (Find_Direct_Name): Save certain elaboration-related attributes. Save the scenario for ABE processing. (Find_Expanded_Name): Save certain elaboration-related attributes. Save the scenario for ABE processing. * sem_ch9.adb (Analyze_Entry_Declaration): Save certain elaboration-related attributes. (Analyze_Requeue): Save certain elaboration-related attributes. Save the scenario for ABE processing. (Analyze_Single_Task_Declaration): Save certain elaboration-related attributes. (Analyze_Task_Type_Declaration): Save certain elaboration-related attributes. * sem_ch12.adb (Analyze_Generic_Package_Declaration): Save certain elaboration-related attributes. (Analyze_Generic_Subprogram_Declaration): Save the SPARK mode in effect. Save certain elaboration-related attributes. (Analyze_Package_Instantiation): Save certain elaboration-related attributes. Save the scenario for ABE processing. Create completing bodies in case the instantiation results in a guaranteed ABE. (Analyze_Subprogram_Instantiation): Save certain elaboration-related attributes Save the scenario for ABE processing. Create a completing body in case the instantiation results in a guaranteed ABE. (Provide_Completing_Bodies): New routine. * sem_elab.ads: Brand new implementation. * sem_prag.adb (Analyze_Pragma, cases Elaborate, Elaborate_All, Elaborate_Body): Do not suppress elaboration warnings. * sem_res.adb (Make_Call_Into_Operator): Set the parent field of the operator. (Resolve_Call): Save certain elaboration-related attributes. Save the scenario for ABE processing. (Resolve_Entity_Name): Do not perform any ABE processing here. (Resolve_Entry_Call): Inherit certain attributes from the original call. * sem_util.adb (Begin_Keyword_Location): New routine. (Defining_Entity): Update the parameter profile. Add processing for concurrent subunits that are rewritten as null statements. (End_Keyword_Location): New routine. (Find_Enclosing_Scope): New routine. (In_Instance_Visible_Part): Code cleanup. (In_Subtree): Update the parameter profile. Add new version. (Is_Preelaborable_Aggregate): New routine. (Is_Preelaborable_Construct): New routine. (Mark_Elaboration_Attributes): New routine. (Scope_Within): Update the parameter profile. (Scope_Within_Or_Same): Update the parameter profile. * sem_util.ads (Begin_Keyword_Location): New routine. (Defining_Entity): Update the parameter profile and the comment on usage. (End_Keyword_Location): New routine. (Find_Enclosing_Scope): New routine. (In_Instance_Visible_Part): Update the parameter profile. (In_Subtree): Update the parameter profile. Add new version. (Is_Preelaborable_Aggregate): New routine. (Is_Preelaborable_Construct): New routine. (Mark_Elaboration_Attributes): New routine. (Scope_Within): Update the parameter profile and the comment on usage. (Scope_Within_Or_Same): Update the parameter profile and the comment on usage. * sem_warn.adb (Check_Infinite_Loop_Warning): Use Has_Condition_Actions to determine whether a loop has meaningful condition actions. (Has_Condition_Actions): New routine. * sinfo.adb (ABE_Is_Certain): Removed. (Is_Declaration_Level_Node): New routine. (Is_Dispatching_Call): New routine. (Is_Elaboration_Checks_OK_Node): New routine. (Is_Initialization_Block): New routine. (Is_Known_Guaranteed_ABE): New routine. (Is_Recorded_Scenario): New routine. (Is_Source_Call): New routine. (Is_SPARK_Mode_On_Node): New routine. (No_Elaboration_Check): Removed. (Target): New routine. (Was_Attribute_Reference): New routine. (Set_ABE_Is_Certain): Removed. (Set_Is_Declaration_Level_Node): New routine. (Set_Is_Dispatching_Call): New routine. (Set_Is_Elaboration_Checks_OK_Node): New routine. (Set_Is_Initialization_Block): New routine. (Set_Is_Known_Guaranteed_ABE): New routine. (Set_Is_Recorded_Scenario): New routine. (Set_Is_Source_Call): New routine. (Set_Is_SPARK_Mode_On_Node): New routine. (Set_No_Elaboration_Check): Removed. (Set_Target): New routine. (Set_Was_Attribute_Reference): New routine. * sinfo.ads: Remove attribute ABE_Is_Certain. Attribute Do_Discriminant_Check now utilizes Flag3. Attribute No_Side_Effect_Removal now utilizes Flag17. Add new node N_Call_Marker. Update the structure of various nodes. (ABE_Is_Certain): Removed along with pragma Inline. (Is_Declaration_Level_Node): New routine along with pragma Inline. (Is_Dispatching_Call): New routine along with pragma Inline. (Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline. (Is_Initialization_Block): New routine along with pragma Inline. (Is_Known_Guaranteed_ABE): New routine along with pragma Inline. (Is_Recorded_Scenario): New routine along with pragma Inline. (Is_Source_Call): New routine along with pragma Inline. (Is_SPARK_Mode_On_Node): New routine along with pragma Inline. (No_Elaboration_Check): Removed along with pragma Inline. (Target): New routine along with pragma Inline. (Was_Attribute_Reference): New routine along with pragma Inline. (Set_ABE_Is_Certain): Removed along with pragma Inline. (Set_Is_Declaration_Level_Node): New routine along with pragma Inline. (Set_Is_Dispatching_Call): New routine along with pragma Inline. (Set_Is_Elaboration_Checks_OK_Node): New routine along with pragma Inline. (Set_Is_Initialization_Block): New routine along with pragma Inline. (Set_Is_Known_Guaranteed_ABE): New routine along with pragma Inline. (Set_Is_Recorded_Scenario): New routine along with pragma Inline. (Set_Is_Source_Call): New routine along with pragma Inline. (Set_Is_SPARK_Mode_On_Node): New routine along with pragma Inline. (Set_No_Elaboration_Check): Removed along with pragma Inline. (Set_Target): New routine along with pragma Inline. (Set_Was_Attribute_Reference): New routine along with pragma Inline. * sprint.adb (Sprint_Node_Actual): Add an entry for N_Call_Marker. From-SVN: r253559
2017-10-09exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking code so ↵Pierre-Marie de Rodat1-3/+2
if BIPAlloc is not passed in... gcc/ada/ 2017-10-09 Bob Duff <duff@adacore.com> * exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking code so if BIPAlloc is not passed in, it will likely raise Program_Error instead of cause miscellaneous chaos. (Is_Build_In_Place_Result_Type): Return False if not Expander_Active, as for the other Is_B-I-P... functions. * sem_aggr.adb (Resolve_Extension_Aggregate): For an extension aggregate whose ancestor part is a build-in-place call returning a nonlimited type, transform the assignment to the ancestor part to use a temp. * sem_ch3.adb (Build_Itype_Reference): Handle the case where we're creating an Itype for a library unit entity. (Check_Initialization): Avoid spurious error message on internally-generated call. * sem_ch5.adb (Analyze_Assignment): Handle the case where the right-hand side is a build-in-place call. This didn't happen when b-i-p was only for limited types. * sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p implies >= Ada 2005. * sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes repeatedly. * sem_util.adb (Next_Actual): Handle case of build-in-place call. 2017-10-09 Arnaud Charlet <charlet@adacore.com> * doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit. 2017-10-09 Piotr Trojanek <trojanek@adacore.com> * libgnarl/s-taprob.adb: Minor whitespace fix. 2017-10-09 Bob Duff <duff@adacore.com> * namet.ads: Minor comment fix. 2017-10-09 Piotr Trojanek <trojanek@adacore.com> * sem_aux.adb (Unit_Declaration_Node): Detect protected declarations, just like other program units listed in Ada RM 10.1(1). 2017-10-09 Justin Squirek <squirek@adacore.com> * sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages. 2017-10-09 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an actual for a formal package is an instantiation of a child unit, create a freeze node for the instance of the parent if it appears in the same scope and is not frozen yet. 2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com> * exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance in-source documentation for tagged types's Offset_To_Top. 2017-10-09 Bob Duff <duff@adacore.com> * exp_ch3.adb (Build_Assignment): Parameter name N was somewhat confusing. Same for N_Loc. Remove assumption that b-i-p implies limited. This is for the case of a function call that occurs as the default for a record component. (Expand_N_Object_Declaration): Deal with the case where expansion has created an object declaration initialized with something like F(...)'Reference. * exp_ch3.adb: Minor reformatting. 2017-10-09 Ed Schonberg <schonberg@adacore.com> * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of the attribute is an object, but it may appear within a conversion. The object itself must be retrieved when generating the range test that implements the validity check on a scalar type. gcc/testsuite/ 2017-10-09 Ed Schonberg <schonberg@adacore.com> * gnat.dg/validity_check2.adb, gnat.dg/validity_check2_pkg.ads: New testcase. From-SVN: r253548
2017-09-29[multiple changes]Pierre-Marie de Rodat2-2/+2
2017-09-29 Bob Duff <duff@adacore.com> * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to what we had before. (Make_Build_In_Place_Call_In_Object_Declaration): Back out previous change. Set the Etype in the class-wide case. This fixes a regression in the libadalang test suite. 2017-09-29 Joel Brobecker <brobecker@adacore.com> * doc/gnat_ugn/building_executable_programs_with_gnat.rst, doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon in comment markup. * gnat_ugn.texi: Regenerate. 2017-09-29 Justin Squirek <squirek@adacore.com> * ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb, fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb, gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb, sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison for checking source file status and error message and/or call to Read_Source_File. * libgnat/s-os_lib.ads: Add new potential value constant for uninitialized file descriptors. * osint.adb, osint.ads (Read_Source_File): Add extra parameter to return result of IO to encompass a read access failure in addition to a file-not-found error. From-SVN: r253294
2017-09-29[multiple changes]Pierre-Marie de Rodat1-1/+1
2017-09-29 Justin Squirek <squirek@adacore.com> * sem_ch8.adb (Mark_Use_Clauses): Add recursive call to properly handle all cases related to marking entity identifiers. 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com> * adaint.c (win32_wait): Properly handle error and take into account the WIN32 limitation on the number of simultaneous wait objects. 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com> * cal.c: Minor proofreading. 2017-09-29 Vasiliy Fofanov <fofanov@adacore.com> * doc/gnat_ugn/gnat_utility_programs.rst: Minor formatting fix. * gnat_ugn.texi: Regenerate. 2017-09-29 Bob Duff <duff@adacore.com> * lib-xref.ads: Comment fix. 2017-09-29 Bob Duff <duff@adacore.com> * exp_aggr.adb: Remove calls to Set_No_Ctrl_Actions for discriminants. Discriminants can't need finalization. 2017-09-29 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Expression_Function): Do not emit freeze nodes for types in expression if the function is within a generic unit. * sem_res.adb (Resolve): In a generic context do not freeze an expression, unless it is an entity. This exception is solely for the purpose of detecting illegal uses of deferred constants in generic units. * sem_res.adb: Minor reformatting. From-SVN: r253285
2017-09-29[multiple changes]Pierre-Marie de Rodat2-1/+4
2017-09-29 Justin Squirek <squirek@adacore.com> * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false redundant warnings. 2017-09-29 Yannick Moy <moy@adacore.com> * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion. 2017-09-29 Eric Botcazou <ebotcazou@adacore.com> * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording. * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment): Document the effect of pragma Optimize_Alignment (Space) on non-packed record types. * gnat_rm.texi: Regenerate. From-SVN: r253284
2017-09-25[multiple changes]Pierre-Marie de Rodat1-9/+9
2017-09-25 Hristian Kirtchev <kirtchev@adacore.com> * sem_res.adb (Replace_Actual_Discriminants): Replace a discriminant for GNATprove. (Resolve_Entry): Clean up predicate 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Constituent): Raise Unrecoverable_Error rather than Program_Error because U_E is more in line with respect to the intended behavior. 2017-09-25 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Resolve_Aspect_Expressions): The expression for aspect Storage_Size does not freeze, and thus can include references to deferred constants. 2017-09-25 Hristian Kirtchev <kirtchev@adacore.com> * exp_spark.adb (Expand_SPARK_Potential_Renaming): Do not process a reference when it appears within a pragma of no significance to SPARK. (In_Insignificant_Pragma): New routine. * sem_prag.ads: Add new table Pragma_Significant_In_SPARK. 2017-09-25 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Analyze_Associations, case N_Formal_Package): If the actual is a renaming, indicate that it is the renamed package that must be frozen before the instantiation. 2017-09-25 Yannick Moy <moy@adacore.com> * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo in description of dimensionality system in GNAT UG. * gnat_ugn.texi: Regenerate. 2017-09-25 Yannick Moy <moy@adacore.com> * gnat1drv.adb: Call Check_Safe_Pointers from the frontend in GNATprove_Mode when switch -gnatdF used. 2017-09-25 Piotr Trojanek <trojanek@adacore.com> * adabkend.adb (Call_Back_End): Reset Current_Error_Node when starting the backend. From-SVN: r253140
2017-09-18[multiple changes]Pierre-Marie de Rodat1-1/+2
2017-09-18 Bob Duff <duff@adacore.com> * sem_ch4.adb (Analyze_Qualified_Expression): Give an error if the type mark refers to the current instance. Set the type to Any_Type in that case, to avoid later crashes. 2017-09-18 Ed Schonberg <schonberg@adacore.com> * exp_ch3.adb (Replace_Discriminant_References): New procedure, subsidiary of Build_Assignment, used to handle the initialization code for a mutable record component whose default value is an aggregate that sets the values of the discriminants of the components. 2017-09-18 Ed Schonberg <schonberg@adacore.com> * gnat.dg/default_variants.adb: New testcase. 2017-09-18 Eric Botcazou <ebotcazou@adacore.com> * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Address>: Mark the entity as being volatile for an overlay that toggles the scalar storage order. 2017-09-18 Fedor Rybin <frybin@adacore.com> * doc/gnat_ugn/gnat_utility_programs.rst: Document that gnattest options -U main and --harness-only are not compatible. From-SVN: r252913
2017-09-13Minor edits.Arnaud Charlet2-9/+19
From-SVN: r252058
2017-09-13Minor edits.Arnaud Charlet4-24/+9
From-SVN: r252056
2017-09-13New file.Arnaud Charlet1-0/+18
From-SVN: r252054
2017-09-11[multiple changes]Arnaud Charlet3-136/+143
2017-09-11 Arnaud Charlet <charlet@adacore.com> * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix sphinx warning. * doc/gnat_ugn/platform_specific_information.rst: Remove doc for no longer supported platforms. * doc/gnat_ugn/gnat_and_program_execution.rst: Added detailed description of the semantics for dimensionality analysis. * gnat_ugn.texi: Regenerated. 2017-09-11 Eric Botcazou <ebotcazou@adacore.com> * freeze.adb (Has_Incomplete_Compoent): Delete. (Freeze_Profile): Do not inhibit the freezing of the profile of an expression function here. (Freeze_Subprogram): Do not re-create extra formals. * sem_ch6.adb (Analyze_Expression_Function): Always pre-analyze the expression if the function is not a completion. (Analyze_Subprogram_Body_Helper): For the body generated from an expression function that is not a completion, do not freeze the profile and temporary mask the types declared outside the expression that are not yet frozen. * sem_res.adb (Rewrite_Renamed_Operator): Also bail out if invoked during the pre-analysis of an expression function. From-SVN: r251978
2017-09-08Minor doc edit.Arnaud Charlet1-3/+8
From-SVN: r251901
2017-09-08conf.py, [...]: Improve support for Ada highlighting.Arnaud Charlet4-14/+31
* doc/share/conf.py, doc/share/latex_elements.py, doc/share/ada_pygments.py, doc/Makefile: Improve support for Ada highlighting. From-SVN: r251890
2017-09-08gnat_rm.texi, [...]: Update documentation.Arnaud Charlet29-6359/+6745
* gnat_rm.texi, gnat_ugn.texi, doc/gnat_ugn/the_gnat_compilation_model.rst, doc/gnat_ugn/getting_started_with_gnat.rst, doc/gnat_ugn/inline_assembler.rst, doc/gnat_ugn/building_executable_programs_with_gnat.rst, doc/gnat_ugn/elaboration_order_handling_in_gnat.rst, doc/gnat_ugn/about_this_guide.rst, doc/gnat_ugn/platform_specific_information.rst, doc/gnat_ugn/example_of_binder_output.rst, doc/gnat_ugn/gnat_and_program_execution.rst, doc/gnat_ugn/gnat_utility_programs.rst, doc/gnat_rm/implementation_of_specific_ada_features.rst, doc/gnat_rm/interfacing_to_other_languages.rst, doc/gnat_rm/implementation_defined_aspects.rst, doc/gnat_rm/intrinsic_subprograms.rst, doc/gnat_rm/implementation_defined_characteristics.rst, doc/gnat_rm/implementation_advice.rst, doc/gnat_rm/implementation_defined_attributes.rst, doc/gnat_rm/compatibility_and_porting_guide.rst, doc/gnat_rm/standard_library_routines.rst, doc/gnat_rm/the_gnat_library.rst, doc/gnat_rm/implementation_defined_pragmas.rst, doc/gnat_rm/representation_clauses_and_pragmas.rst, doc/gnat_rm/standard_and_implementation_defined_restrictions.rst, doc/gnat_rm/obsolescent_features.rst, doc/gnat_rm/about_this_guide.rst, doc/gnat_rm/the_implementation_of_standard_i_o.rst, doc/gnat_rm/implementation_of_ada_2012_features.rst, doc/gnat_ugn.rst, doc/gnat_rm.rst: Update documentation. From-SVN: r251889
2017-04-25gnat_rm.texi, [...]: Update documentation.Arnaud Charlet11-286/+411
* gnat_rm.texi, gnat_ugn.texi, doc/gnat_ugn/building_executable_programs_with_gnat.rst, doc/gnat_ugn/platform_specific_information.rst, doc/gnat_ugn/gnat_and_program_execution.rst, doc/gnat_ugn/gnat_utility_programs.rst, doc/gnat_ugn/the_gnat_compilation_model.rst, doc/gnat_rm/implementation_defined_attributes.rst, doc/gnat_rm/the_gnat_library.rst, doc/gnat_rm/implementation_defined_pragmas.rst, doc/gnat_rm/representation_clauses_and_pragmas.rst, doc/gnat_rm/implementation_of_specific_ada_features.rst, doc/gnat_rm/implementation_defined_aspects.rst, doc/gnat_rm/implementation_defined_characteristics.rst: Update documentation. From-SVN: r247253
2017-04-03Fix numerous typos in commentsJonathan Wakely1-1/+1
gcc: * alias.c (base_alias_check): Fix typo in comment. * cgraph.h (class ipa_polymorphic_call_context): Likewise. * cgraphunit.c (symbol_table::compile): Likewise. * collect2.c (maybe_run_lto_and_relink): Likewise. * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise. * config/avr/avr-arch.h (avr_arch_info_t): Likewise. * config/avr/avr.c (avr_map_op_t): Likewise. * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise. * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise. * config/epiphany/epiphany.md (movcc): Likewise. * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise. * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue): Likewise. * config/mips/mips.c (mips_save_restore_reg): Likewise. * config/rx/rx.c (rx_is_restricted_memory_address): Likewise. * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise. * config/sh/sh.c (sh_rtx_costs): Likewise. * fold-const.c (fold_truth_andor): Likewise. * genautomata.c (collapse_flag): Likewise. * gengtype.h (struct type::u::s): Likewise. * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise. * input.c (FORMAT_AMOUNT): Likewise. * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector) (known_aggs_to_agg_replacement_list): Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise. * ipa-polymorphic-call.c (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise. * loop-unroll.c (analyze_insn_to_expand_var): Likewise. * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos): Likewise. * modulo-sched.c (apply_reg_moves): Likewise. * omp-expand.c (build_omp_regions_1): Likewise. * trans-mem.c (struct tm_wrapper_hasher): Likewise. * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise. * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise. * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise. * value-prof.c: Likewise. * var-tracking.c (val_reset): Likewise. gcc/ada: * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo. * g-socket.adb (To_Host_Entry): Fix typo in comment. * gnat_ugn.texi: Fix typo. * raise.c (_gnat_builtin_longjmp): Fix capitalization in comment. * s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment. * sem_ch3.adb (Build_Derived_Record_Type): Likewise. * sem_util.adb (Mark_Coextensions): Likewise. * sem_util.ads (Available_Full_View_Of_Component): Likewise. gcc/c: * c-array-notation.c: Fix typo in comment. gcc/c-family: * c-warn.c (do_warn_double_promotion): Fix typo in comment. gcc/cp: * class.c (update_vtable_entry_for_fn): Fix typo in comment. * decl2.c (one_static_initialization_or_destruction): Likewise. * name-lookup.c (store_bindings): Likewise. * parser.c (make_call_declarator): Likewise. * pt.c (check_explicit_specialization): Likewise. gcc/testsuite: * g++.old-deja/g++.benjamin/scope02.C: Fix typo in comment. * gcc.dg/20031012-1.c: Likewise. * gcc.dg/ipa/ipcp-1.c: Likewise. * gcc.dg/torture/matrix-3.c: Likewise. * gcc.target/powerpc/ppc-spe.c: Likewise. * gcc.target/rx/zero-width-bitfield.c: Likewise. libcpp: * include/line-map.h (LINEMAPS_MACRO_MAPS): Fix typo in comment. * lex.c (search_line_fast): Likewise. * pch.h (cpp_valid_state): Likewise. libdecnumber: * decCommon.c (decFloatFromPackedChecked): Fix typo in comment. * decNumber.c (decNumberPower, decMultiplyOp): Likewise. libgcc: * config/c6x/pr-support.c (__gnu_unwind_execute): Fix typo in comment. libitm: * libitm_i.h (sutrct gtm_thread): Fix typo in comment. From-SVN: r246664