diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-12-12 12:52:04 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-12-12 12:52:04 +0100 |
commit | fe58fea70b2614f36fb9e1fde78af892426ad8a6 (patch) | |
tree | 47e75a0a07789fbe0929f7955dd7427cfbfb0c0b /gcc/ada/prj-env.adb | |
parent | ee1a757231c05815f7e2f9e5e0ced98b380c0416 (diff) | |
download | gcc-fe58fea70b2614f36fb9e1fde78af892426ad8a6.zip gcc-fe58fea70b2614f36fb9e1fde78af892426ad8a6.tar.gz gcc-fe58fea70b2614f36fb9e1fde78af892426ad8a6.tar.bz2 |
[multiple changes]
2011-12-12 Gary Dismukes <dismukes@adacore.com>
* freeze.adb (Freeze_Expression): Allow freezing of static
scalar subtypes that are prefixes of an attribute, even if not
yet marked static. Such attributes will get marked as static
later in Eval_Attribute (as called from Resolve_Attribute).
* sem_attr.adb (Eval_Attribute): Remove wrong code that does an
early return for attribute prefixes that are unfrozen source-level
types. This code was incorrectly bypassing folding of unfrozen
static subtype attributes in default expressions (the executable
example in the now-deleted comment was in fact illegal).
2011-12-12 Robert Dewar <dewar@adacore.com>
* a-coinve.adb, sem_res.adb, prj-nmsc.adb, a-cobove.adb, a-convec.adb,
gnatls.adb, sem_ch13.adb, prj-env.adb, prj-env.ads: Minor reformatting.
2011-12-12 Tristan Gingold <gingold@adacore.com>
* gsocket.h: Adjust previous patch.
From-SVN: r182228
Diffstat (limited to 'gcc/ada/prj-env.adb')
-rw-r--r-- | gcc/ada/prj-env.adb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/ada/prj-env.adb b/gcc/ada/prj-env.adb index 7cd1fe5..bce59d9 100644 --- a/gcc/ada/prj-env.adb +++ b/gcc/ada/prj-env.adb @@ -1405,23 +1405,33 @@ package body Prj.Env is -- Get_Runtime_Path -- ---------------------- - function Get_Runtime_Path (Self : Project_Search_Path; Name : String) - return String_Access is + function Get_Runtime_Path + (Self : Project_Search_Path; + Name : String) return String_Access + is function Is_Base_Name (Path : String) return Boolean; -- Returns True if Path has no directory separator + ------------------ + -- Is_Base_Name -- + ------------------ + function Is_Base_Name (Path : String) return Boolean is begin - for I in Path'Range loop - if Path (I) = Directory_Separator or else Path (I) = '/' then + for J in Path'Range loop + if Path (J) = Directory_Separator or else Path (J) = '/' then return False; end if; end loop; + return True; end Is_Base_Name; function Find_Rts_In_Path is new Prj.Env.Find_Name_In_Path (Check_Filename => Is_Directory); + + -- Start of processing for Get_Runtime_Path + begin if not Is_Base_Name (Name) then return Find_Rts_In_Path (Self, Name); |