aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/make.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2004-06-11 12:47:39 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2004-06-11 12:47:39 +0200
commit5453d5bde8413766efffff9fc5e3205fea13bc7b (patch)
tree087a2a5de5d1db66fdac9e584721922ca4c2cc21 /gcc/ada/make.adb
parentd1ee83813d3719902016705cfb1898b1bb005027 (diff)
downloadgcc-5453d5bde8413766efffff9fc5e3205fea13bc7b.zip
gcc-5453d5bde8413766efffff9fc5e3205fea13bc7b.tar.gz
gcc-5453d5bde8413766efffff9fc5e3205fea13bc7b.tar.bz2
[multiple changes]
2004-06-11 Vincent Celier <celier@gnat.com> * mlib-tgt-vms-alpha.adb (Build_Dynamic_Library): Issue switch -R to gnatsym, when symbol policy is Restricted. * mlib-tgt-vms-ia64.adb (Build_Dynamic_Library): Issue switch -R to gnatsym, when symbol policy is Restricted. * symbols-vms-alpha.adb (Initialize): When symbol policy is Restricted, read the symbol file. (Finalize): Fail in symbol policy Restricted if a symbol in the original symbol file is not in the object files. Do not create a new symbol file when symbol policy is Restricted. * gnatbind.adb (Gnatbind): Initialize Snames, because Snames is used in Scng. * gnatsym.adb (Parse_Vmd_Line): Process new switch -R for symbol policy Restricted. (Usage): Line for new switch -R * make.adb (Initialize): When the platform is not VMS, add the directory where gnatmake is invoked in the front of the path, if gnatmake is invoked with directory information. Change the Scan_Args while loop to a for loop. (Recursive_Compute_Depth): Remove parameter Visited. Improve efficiency: if Depth is equal or greater than the proposed depth, there is nothing to do. (Initialize): Call Recursive_Compute_Depth with initial Depth equal to 1 instead of 0. * prj.ads: Add new symbol policy Restricted. * prj-dect.adb (Parse_Case_Construction): Call End_Case_Construction with the new parameters Check_All_Labels and Case_Location. * prj-nmsc.adb (Ada_Check): Process new symbol policy Restricted (Library_Symbol_File needs to be defined). * prj-strt.adb (End_Case_Construction): New parameters Check_All_Labels and Case_Location If Check_All_Labels is True, check that all values of the string type are used, and output warning(s) if they are not. * prj-strt.ads (End_Case_Construction): New parameters Check_All_Labels and Case_Location. * gnat_ugn.texi: Reorder subclauses in menus "Switches for gcc" * gnat_ugn.texi: Update documentation about the library directory in Library Projects. * makegpr.adb (Display_Command): In verbose mode, also display the value of the CPATH env var, when the compiler is gcc. (Initialize): Change the Scan_Args while loop to a for loop (Compile_Individual_Sources): Change directory to object directory before compilations. * symbols.ads: New symbol policy Restricted. 2004-06-11 Olivier Hainque <hainque@act-europe.fr> * a-except.adb (Raise_After_Setup family): Remove. The responsibility is now taken care of internally in the Exception_Propagation package and does not require clients assistance any more. * a-exexpr.adb (Is_Setup_And_Not_Propagated, Set_Setup_And_Not_Propagated, and Clear_Setup_And_Not_Propagated): New functions. Helpers to maintain a predicate required in the handling of occurrence transfer between tasks. This is now handled internally and does not require clients assistance for the setup/propagate separation anymore. (Setup_Exception, Propagate_Exception): Simplify the Private_Data allocation strategy, handle the Setup_And_Not_Propagated predicate and document. * s-taenca.adb (Check_Exception): Use raise_with_msg instead of raise_after_setup, now that everything is handled internally within the setup/propagation engine. 2004-06-11 Hristian Kirtchev <kirtchev@gnat.com> * exp_ch6.adb (Expand_Inlined_Call): Add function Formal_Is_Used_Once. Add additional conditions for the case of an actual being a simple name or literal. Improve inlining by preventing the generation of temporaries with a short lifetime (one use). 2004-06-11 Hristian Kirtchev <kirtchev@gnat.com> PR ada/15587 * einfo.ads: Minor comment updates for Has_Completion and E_Constant list of flags. * sem_ch3.adb (Analyze_Object_Declaration): Full constant declarations and constant redeclarations now set the Has_Completion flag of their defining identifiers. * sem_ch7.adb (Analyze_Package_Spec): Add procedure Inspect_Deferred_Constant_Completion. Used to detect private deferred constants that have not been completed either by a constant redeclaration or pragma Import. Emits error message "constant declaration requires initialization expression". * sem_prag.adb (Process_Import_Or_Interface): An Import pragma now completes a deferred constant. 2004-06-11 Geert Bosch <bosch@gnat.com> * eval_fat.adb (Decompose_Int): Fix rounding of negative numbers. * s-fatgen.adb (Gradual_Scaling): Correct off-by-one error in calculating exponent for scaling denormal numbers. (Leading_Part): Properly raise Constraint_Error for zero or negative Adjustment. (Remainder): Properly raise Constraint_Error for zero divisor. 2004-06-11 Thomas Quinot <quinot@act-europe.fr> * sem_util.adb: Minor reformatting. * exp_ch2.adb (Expand_Entry_Parameter): Generate an explicit dereference when accessing the entry parameter record. (Check_Array_Type): Always check for possible implicit dereference. (maybe_implicit_dereference): Rename to check_no_implicit_derefence. Abort if a pointer is still present (denoting that an implicit dereference was left in the tree by the front-end). * sem_attr.adb (Expand_Entry_Parameter): Generate an explicit dereference when accessing the entry parameter record. (Check_Array_Type): Always check for possible implicit dereference. (maybe_implicit_dereference): Rename to check_no_implicit_derefence. Abort if a pointer is still present (denoting that an implicit dereference was left in the tree by the front-end). 2004-06-11 Emmanuel Briot <briot@act-europe.fr> * g-debpoo.adb (Deallocate, Dereference): Add prefix "error:" to error message, like the compiler itself does. Easier to parse the output. * g-debpoo.ads: (Allocate, Deallocate, Dereference): Add comments. * gnat_ugn.texi (gnatxref, gnatfind): Clarify that source names should be base names, and not includes directories. 2004-06-11 Arnaud Charlet <charlet@act-europe.fr> * Makefile.generic ($(EXEC)): Depend on $(OBJECTS), not $(OBJ_FILES), so that dependencies are properly taken into account by make. 2004-06-11 Arnaud Charlet <charlet@act-europe.fr> PR ada/15622 * s-unstyp.ads, s-maccod.ads, sem_ch8.adb, s-auxdec.ads, exp_intr.adb, s-auxdec-vms_64.ads: Fix typo: instrinsic -> intrinsic 2004-06-11 Jerome Guitton <guitton@act-europe.fr> * Makefile.in (install-gnatlib): install target-specific run-time files. * Make-lang.in: Remove obsolete targets. 2004-06-11 Ed Schonberg <schonberg@gnat.com> * par-ch12.adb (P_Generic): Add scope before analyzing subprogram specification, to catch misuses of program unit names. * sem_res.adb (Resolve_Type_Conversion): Do not emit warnings on superfluous conversions in an instance. 2004-06-11 Ed Schonberg <schonberg@gnat.com> PR ada/15403 * sem_ch12.adb (Save_References): If operator node has been folded to enumeration literal, associated_node must be discarded. 2004-06-11 Jose Ruiz <ruiz@act-europe.fr> * s-stchop-vxworks.adb: Add required pragma Convention to Task_Descriptor because it is updated by a C function. From-SVN: r82973
Diffstat (limited to 'gcc/ada/make.adb')
-rw-r--r--gcc/ada/make.adb96
1 files changed, 55 insertions, 41 deletions
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index a4b2a41..3de414c 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -502,12 +502,8 @@ package body Make is
procedure Debug_Msg (S : String; N : Name_Id);
-- If Debug.Debug_Flag_W is set outputs string S followed by name N.
- type Project_Array is array (Positive range <>) of Project_Id;
- No_Projects : constant Project_Array := (1 .. 0 => No_Project);
-
procedure Recursive_Compute_Depth
(Project : Project_Id;
- Visited : Project_Array;
Depth : Natural);
-- Compute depth of Project and of the projects it depends on
@@ -5554,8 +5550,6 @@ package body Make is
----------------
procedure Initialize is
- Next_Arg : Positive;
-
begin
-- Override default initialization of Check_Object_Consistency
-- since this is normally False for GNATBIND, but is True for
@@ -5585,10 +5579,37 @@ package body Make is
Mains.Delete;
- Next_Arg := 1;
- Scan_Args : while Next_Arg <= Argument_Count loop
+ -- Add the directory where gnatmake is invoked in the front of the
+ -- path, if gnatmake is invoked with directory information.
+ -- Only do this if the platform is not VMS, where the notion of path
+ -- does not really exist.
+
+ if not OpenVMS then
+ declare
+ Command : constant String := Command_Name;
+ begin
+ for Index in reverse Command'Range loop
+ if Command (Index) = Directory_Separator then
+ declare
+ Absolute_Dir : constant String :=
+ Normalize_Pathname (Command (Command'First .. Index));
+ PATH : constant String :=
+ Absolute_Dir & Path_Separator & Getenv ("PATH").all;
+
+ begin
+ Setenv ("PATH", PATH);
+ end;
+
+ exit;
+ end if;
+ end loop;
+ end;
+ end if;
+
+ -- Scan the switches and arguments
+
+ Scan_Args : for Next_Arg in 1 .. Argument_Count loop
Scan_Make_Arg (Argument (Next_Arg), And_Save => True);
- Next_Arg := Next_Arg + 1;
end loop Scan_Args;
if Usage_Requested then
@@ -5688,8 +5709,13 @@ package body Make is
-- Compute depth of each project
+ for Proj in 1 .. Projects.Last loop
+ Projects.Table (Proj).Seen := False;
+ Projects.Table (Proj).Depth := 0;
+ end loop;
+
Recursive_Compute_Depth
- (Main_Project, Visited => No_Projects, Depth => 0);
+ (Main_Project, Depth => 1);
else
@@ -6189,26 +6215,28 @@ package body Make is
procedure Recursive_Compute_Depth
(Project : Project_Id;
- Visited : Project_Array;
Depth : Natural)
is
List : Project_List;
Proj : Project_Id;
- OK : Boolean;
- New_Visited : constant Project_Array := Visited & Project;
begin
- -- Nothing to do if there is no project
+ -- Nothing to do if there is no project or if the project has already
+ -- been seen or if the depth is large enough.
- if Project = No_Project then
+ if Project = No_Project
+ or else Projects.Table (Project).Seen
+ or else Projects.Table (Project).Depth >= Depth
+ then
return;
end if;
- -- If current depth of project is lower than Depth, adjust it
+ Projects.Table (Project).Depth := Depth;
- if Projects.Table (Project).Depth < Depth then
- Projects.Table (Project).Depth := Depth;
- end if;
+ -- Mark the project as Seen to avoid endless loop caused by limited
+ -- withs.
+
+ Projects.Table (Project).Seen := True;
List := Projects.Table (Project).Imported_Projects;
@@ -6217,34 +6245,20 @@ package body Make is
while List /= Empty_Project_List loop
Proj := Project_Lists.Table (List).Project;
List := Project_Lists.Table (List).Next;
-
- OK := True;
-
- -- To avoid endless loops due to cycles with limited widts,
- -- do not revisit a project that is already in the chain of imports
- -- that brought us here.
-
- for J in Visited'Range loop
- if Visited (J) = Proj then
- OK := False;
- exit;
- end if;
- end loop;
-
- if OK then
- Recursive_Compute_Depth
- (Project => Proj,
- Visited => New_Visited,
- Depth => Depth + 1);
- end if;
+ Recursive_Compute_Depth
+ (Project => Proj,
+ Depth => Depth + 1);
end loop;
-- Visit a project being extended, if any
Recursive_Compute_Depth
(Project => Projects.Table (Project).Extends,
- Visited => New_Visited,
- Depth => Depth + 1);
+ Depth => Depth + 1);
+
+ -- Reset the Seen flag, as we leave this project
+
+ Projects.Table (Project).Seen := False;
end Recursive_Compute_Depth;
-----------------------