Commit fcfb981b by Arnaud Charlet

[multiple changes]

2010-06-18  Geert Bosch  <bosch@adacore.com>

	* i-forbla-darwin.adb: Include -lgnala and -lm in linker options for
	Darwin.

2010-06-18  Robert Dewar  <dewar@adacore.com>

	* gnat1drv.adb (Adjust_Global_Switches): Set Use_Expression_With_Actions
	true for gcc.

2010-06-18  Robert Dewar  <dewar@adacore.com>

	* sprint.adb: Minor format change for N_Expression_With_Actions.
	* repinfo.adb: Minor reformatting.

2010-06-18  Ed Schonberg  <schonberg@adacore.com>

	* sem_elim.adb (Check_Eliminated): If within a subunit, use
	Defining_Entity to obtain the name of the entity in the proper body, to
	properly handle both separate packages and subprograms.

2010-06-18  Emmanuel Briot  <briot@adacore.com>

	* prj-nmsc.adb (Check_File): New parameter Display_Path.

From-SVN: r160976
parent 48b351d9
2010-06-18 Geert Bosch <bosch@adacore.com>
* i-forbla-darwin.adb: Include -lgnala and -lm in linker options for
Darwin.
2010-06-18 Robert Dewar <dewar@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Set Use_Expression_With_Actions
true for gcc.
2010-06-18 Robert Dewar <dewar@adacore.com>
* sprint.adb: Minor format change for N_Expression_With_Actions.
* repinfo.adb: Minor reformatting.
2010-06-18 Ed Schonberg <schonberg@adacore.com>
* sem_elim.adb (Check_Eliminated): If within a subunit, use
Defining_Entity to obtain the name of the entity in the proper body, to
properly handle both separate packages and subprograms.
2010-06-18 Emmanuel Briot <briot@adacore.com>
* prj-nmsc.adb (Check_File): New parameter Display_Path.
2010-06-18 Thomas Quinot <quinot@adacore.com> 2010-06-18 Thomas Quinot <quinot@adacore.com>
* g-socket.adb, g-socket.ads (Null_Selector): New object. * g-socket.adb, g-socket.ads (Null_Selector): New object.
......
...@@ -353,11 +353,11 @@ procedure Gnat1drv is ...@@ -353,11 +353,11 @@ procedure Gnat1drv is
then then
Use_Expression_With_Actions := False; Use_Expression_With_Actions := False;
-- Otherwise normal gcc back end, for now still turn usage off by -- Otherwise normal gcc back end, which does implement this feature
-- default. -- so by default we allow its use.
else else
Use_Expression_With_Actions := False; Use_Expression_With_Actions := True;
end if; end if;
-- Set switch indicating if back end can handle limited types, and -- Set switch indicating if back end can handle limited types, and
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2006-2009, Free Software Foundation, Inc. -- -- Copyright (C) 2006-2010, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -32,5 +32,7 @@ ...@@ -32,5 +32,7 @@
-- Version for Mac OS X -- Version for Mac OS X
package body Interfaces.Fortran.BLAS is package body Interfaces.Fortran.BLAS is
pragma Linker_Options ("-lgnala");
pragma Linker_Options ("-lm");
pragma Linker_Options ("-Wl,-framework,vecLib"); pragma Linker_Options ("-Wl,-framework,vecLib");
end Interfaces.Fortran.BLAS; end Interfaces.Fortran.BLAS;
...@@ -298,6 +298,7 @@ package body Prj.Nmsc is ...@@ -298,6 +298,7 @@ package body Prj.Nmsc is
Data : in out Tree_Processing_Data; Data : in out Tree_Processing_Data;
Source_Dir_Rank : Natural; Source_Dir_Rank : Natural;
Path : Path_Name_Type; Path : Path_Name_Type;
Display_Path : Path_Name_Type;
File_Name : File_Name_Type; File_Name : File_Name_Type;
Display_File_Name : File_Name_Type; Display_File_Name : File_Name_Type;
Locally_Removed : Boolean; Locally_Removed : Boolean;
...@@ -307,11 +308,12 @@ package body Prj.Nmsc is ...@@ -307,11 +308,12 @@ package body Prj.Nmsc is
-- schemes, it is added to various htables through Add_Source and to -- schemes, it is added to various htables through Add_Source and to
-- Source_Paths_Htable. -- Source_Paths_Htable.
-- --
-- Name is the name of the candidate file. It hasn't been normalized yet -- File_Name is the same as Display_File_Name, but has been normalized.
-- and is the direct result of readdir(). -- They do not include the directory information.
-- --
-- File_Name is the same as Name, but has been normalized. -- Path and Display_Path on the other hand are the full path to the file.
-- Display_File_Name, however, has not been normalized. -- Path must have been normalized (canonical casing and possibly links
-- resolved).
-- --
-- Source_Directory is the directory in which the file was found. It is -- Source_Directory is the directory in which the file was found. It is
-- neither normalized nor has had links resolved, and must not end with a -- neither normalized nor has had links resolved, and must not end with a
...@@ -6663,15 +6665,12 @@ package body Prj.Nmsc is ...@@ -6663,15 +6665,12 @@ package body Prj.Nmsc is
Data : in out Tree_Processing_Data; Data : in out Tree_Processing_Data;
Source_Dir_Rank : Natural; Source_Dir_Rank : Natural;
Path : Path_Name_Type; Path : Path_Name_Type;
Display_Path : Path_Name_Type;
File_Name : File_Name_Type; File_Name : File_Name_Type;
Display_File_Name : File_Name_Type; Display_File_Name : File_Name_Type;
Locally_Removed : Boolean; Locally_Removed : Boolean;
For_All_Sources : Boolean) For_All_Sources : Boolean)
is is
Canonical_Path : constant Path_Name_Type :=
Path_Name_Type
(Canonical_Case_File_Name (Name_Id (Path)));
Name_Loc : Name_Location := Name_Loc : Name_Location :=
Source_Names_Htable.Get Source_Names_Htable.Get
(Project.Source_Names, File_Name); (Project.Source_Names, File_Name);
...@@ -6721,11 +6720,11 @@ package body Prj.Nmsc is ...@@ -6721,11 +6720,11 @@ package body Prj.Nmsc is
Check_Name := True; Check_Name := True;
else else
Name_Loc.Source.Path := (Canonical_Path, Path); Name_Loc.Source.Path := (Path, Display_Path);
Source_Paths_Htable.Set Source_Paths_Htable.Set
(Data.Tree.Source_Paths_HT, (Data.Tree.Source_Paths_HT,
Canonical_Path, Path,
Name_Loc.Source); Name_Loc.Source);
-- Check if this is a subunit -- Check if this is a subunit
...@@ -6734,7 +6733,7 @@ package body Prj.Nmsc is ...@@ -6734,7 +6733,7 @@ package body Prj.Nmsc is
and then Name_Loc.Source.Kind = Impl and then Name_Loc.Source.Kind = Impl
then then
Src_Ind := Sinput.P.Load_Project_File Src_Ind := Sinput.P.Load_Project_File
(Get_Name_String (Canonical_Path)); (Get_Name_String (Path));
if Sinput.P.Source_File_Is_Subunit (Src_Ind) then if Sinput.P.Source_File_Is_Subunit (Src_Ind) then
Override_Kind (Name_Loc.Source, Sep); Override_Kind (Name_Loc.Source, Sep);
...@@ -6786,7 +6785,7 @@ package body Prj.Nmsc is ...@@ -6786,7 +6785,7 @@ package body Prj.Nmsc is
Display_File => Display_File_Name, Display_File => Display_File_Name,
Unit => Unit, Unit => Unit,
Locally_Removed => Locally_Removed, Locally_Removed => Locally_Removed,
Path => (Canonical_Path, Path)); Path => (Path, Display_Path));
-- If it is a source specified in a list, update the entry in -- If it is a source specified in a list, update the entry in
-- the Source_Names table. -- the Source_Names table.
...@@ -6930,11 +6929,20 @@ package body Prj.Nmsc is ...@@ -6930,11 +6929,20 @@ package body Prj.Nmsc is
end if; end if;
end if; end if;
-- Preserve the user's original casing and use of
-- links. The display_value (a directory) already
-- ends with a directory separator by construction,
-- so no need to add one.
Get_Name_String (Element.Display_Value);
Get_Name_String_And_Append (Display_File_Name);
Check_File Check_File
(Project => Project, (Project => Project,
Source_Dir_Rank => Num_Nod.Number, Source_Dir_Rank => Num_Nod.Number,
Data => Data, Data => Data,
Path => Path, Path => Path,
Display_Path => Name_Find,
File_Name => File_Name, File_Name => File_Name,
Locally_Removed => To_Remove, Locally_Removed => To_Remove,
Display_File_Name => Display_File_Name, Display_File_Name => Display_File_Name,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1999-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1999-2010, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -403,7 +403,6 @@ package body Repinfo is ...@@ -403,7 +403,6 @@ package body Repinfo is
if List_Representation_Info >= 2 then if List_Representation_Info >= 2 then
List_Object_Info (E); List_Object_Info (E);
end if; end if;
end if; end if;
-- Recurse into nested package, but not if they are package -- Recurse into nested package, but not if they are package
......
...@@ -299,7 +299,7 @@ package body Sem_Elim is ...@@ -299,7 +299,7 @@ package body Sem_Elim is
-- parsed as a child unit, but the current compilation unit is in -- parsed as a child unit, but the current compilation unit is in
-- fact the parent in which the subunit is embedded. We must skip -- fact the parent in which the subunit is embedded. We must skip
-- the first name which is that of the subunit to match the pragma -- the first name which is that of the subunit to match the pragma
-- specification. -- specification. Body may be that of a package or subprogram.
declare declare
Par : Node_Id; Par : Node_Id;
...@@ -308,7 +308,7 @@ package body Sem_Elim is ...@@ -308,7 +308,7 @@ package body Sem_Elim is
Par := Parent (E); Par := Parent (E);
while Present (Par) loop while Present (Par) loop
if Nkind (Par) = N_Subunit then if Nkind (Par) = N_Subunit then
if Chars (Defining_Unit_Name (Proper_Body (Par))) = if Chars (Defining_Entity (Proper_Body (Par))) =
Elmt.Unit_Name (Up) Elmt.Unit_Name (Up)
then then
Up := Up - 1; Up := Up - 1;
......
...@@ -1537,7 +1537,7 @@ package body Sprint is ...@@ -1537,7 +1537,7 @@ package body Sprint is
when N_Expression_With_Actions => when N_Expression_With_Actions =>
Indent_Begin; Indent_Begin;
Write_Indent_Str_Sloc ("do"); Write_Indent_Str_Sloc ("do ");
Indent_Begin; Indent_Begin;
Sprint_Node_List (Actions (Node)); Sprint_Node_List (Actions (Node));
Indent_End; Indent_End;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment