diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-17 09:20:50 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-17 09:20:50 +0000 |
commit | 30ab103b01a95bb8ddde392662a8421715ecacfb (patch) | |
tree | ac2ce43d8b87906a4f1c44c43fc8feeb03aaee9a /gcc/ada/prj-nmsc.adb | |
parent | 6a781f8ebbee811d36e45bef81b26adee83f2fb4 (diff) | |
download | gcc-30ab103b01a95bb8ddde392662a8421715ecacfb.tar.gz |
2014-10-17 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb (Expand_N_Task_Body): Add defense against
previous errors.
* freeze.adb (Freeze_Entity): Add defense against checking null
scope for generic.
* restrict.adb (Tasking_Allowed): Add test for No_Run_Time mode.
* sem_ch13.adb (Freeze_Entity_Checks): Add defense against
previous errors.
* sem_ch9.adb (Analyze_Task_Type_Declaration): Give error if
in No_Run_Time mode.
2014-10-17 Robert Dewar <dewar@adacore.com>
* prj-makr.adb: Minor reformatting.
2014-10-17 Robert Dewar <dewar@adacore.com>
* gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb,
prj-conf.adb, prj-env.adb: Use Is_Directory_Separator where possible.
2014-10-17 Ed Schonberg <schonberg@adacore.com>
* exp_prag.adb (Undo_Initialization): If Initialize_Scalars
is enabled, code will be generated for some composite types
to initialize an object after its declaration. If there is
a subsequent Import pragma for the object, that code must be
removed as specified byw the semantics of the pragma, and to
prevent out-of-order elaboration issues in the back-end.
2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_N_Op_Concat): Keep concatenation operator
wrapping mechanism under debug flag -gnatd.h.
* debug.adb: Claim debug switch -gnatd.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216384 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-nmsc.adb')
-rw-r--r-- | gcc/ada/prj-nmsc.adb | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index 5d3d6290799..24007995df1 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -5031,10 +5031,7 @@ package body Prj.Nmsc is if OK then for J in 1 .. Name_Len loop - if Name_Buffer (J) = '/' - or else - Name_Buffer (J) = Directory_Separator - then + if Is_Directory_Separator (Name_Buffer (J)) then OK := False; exit; end if; @@ -5336,9 +5333,7 @@ package body Prj.Nmsc is function Compute_Directory_Last (Dir : String) return Natural is begin if Dir'Length > 1 - and then (Dir (Dir'Last - 1) = Directory_Separator - or else - Dir (Dir'Last - 1) = '/') + and then Is_Directory_Separator (Dir (Dir'Last - 1)) then return Dir'Last - 1; else @@ -5858,7 +5853,7 @@ package body Prj.Nmsc is -- Check that there is no directory information for J in 1 .. Last loop - if Line (J) = '/' or else Line (J) = Directory_Separator then + if Is_Directory_Separator (Line (J)) then Error_Msg_File_1 := Source_Name; Error_Msg (Data.Flags, @@ -6485,15 +6480,12 @@ package body Prj.Nmsc is -- Check that there is no directory information for J in 1 .. Last loop - if Line (J) = '/' - or else - Line (J) = Directory_Separator - then + if Is_Directory_Separator (Line (J)) then Error_Msg_File_1 := Name; Error_Msg (Data.Flags, - "file name cannot include " & - "directory information ({)", + "file name cannot include " + & "directory information ({)", Location, Project.Project); exit; end if; @@ -6600,10 +6592,7 @@ package body Prj.Nmsc is -- Check that there is no directory information for J in 1 .. Name_Len loop - if Name_Buffer (J) = '/' - or else - Name_Buffer (J) = Directory_Separator - then + if Is_Directory_Separator (Name_Buffer (J)) then Error_Msg_File_1 := Name; Error_Msg (Data.Flags, @@ -7394,11 +7383,11 @@ package body Prj.Nmsc is if Name (1 .. Last) /= "." and then Name (1 .. Last) /= ".." then declare Path_Name : constant String := - Normalize_Pathname - (Name => Name (1 .. Last), - Directory => Path_Str, - Resolve_Links => Resolve_Links) - & Directory_Separator; + Normalize_Pathname + (Name => Name (1 .. Last), + Directory => Path_Str, + Resolve_Links => Resolve_Links) + & Directory_Separator; Path2 : Path_Information; OK : Boolean := True; @@ -7475,8 +7464,7 @@ package body Prj.Nmsc is if Search_For = Search_Files then while Pattern_End >= Pattern'First - and then Pattern (Pattern_End) /= '/' - and then Pattern (Pattern_End) /= Directory_Separator + and then not Is_Directory_Separator (Pattern (Pattern_End)) loop Pattern_End := Pattern_End - 1; end loop; @@ -7512,9 +7500,9 @@ package body Prj.Nmsc is Recursive := Pattern_End - 1 >= Pattern'First and then Pattern (Pattern_End - 1 .. Pattern_End) = "**" - and then (Pattern_End - 1 = Pattern'First - or else Pattern (Pattern_End - 2) = '/' - or else Pattern (Pattern_End - 2) = Directory_Separator); + and then + (Pattern_End - 1 = Pattern'First + or else Is_Directory_Separator (Pattern (Pattern_End - 2))); if Recursive then Pattern_End := Pattern_End - 2; @@ -7631,7 +7619,7 @@ package body Prj.Nmsc is declare Source_Directory : constant String := Get_Name_String (Element.Value) - & Directory_Separator; + & Directory_Separator; Dir_Last : constant Natural := Compute_Directory_Last (Source_Directory); |