summaryrefslogtreecommitdiff
path: root/gcc/ada/gnatcmd.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-07 09:08:36 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-07 09:08:36 +0000
commit3568e5542f2c0d54d8ad3bc4d429cb2335bcec26 (patch)
tree9eb9f6ea309cf4a3785836cc3a7db2d6bbfd6ab3 /gcc/ada/gnatcmd.adb
parent01e4660c73704b045d625825322c834cf04e0116 (diff)
downloadgcc-3568e5542f2c0d54d8ad3bc4d429cb2335bcec26.tar.gz
2010-10-07 Ed Schonberg <schonberg@adacore.com>
* par-ch5.adb (P_Sequence_Of_Statements): In Ada2012 a label can end a sequence of statements. 2010-10-07 Vincent Celier <celier@adacore.com> * gnatcmd.adb (Check_Files): Only add a .ci files if it exists 2010-10-07 Javier Miranda <miranda@adacore.com> * a-tags.ads, a-tags.adb (Type_Is_Abstract): New subprogram. * rtsfind.ads (RE_Type_Is_Abstract): New entity. * exp_disp.adb (Make_DT): Initialize TSD component Type_Is_Abstract. 2010-10-07 Arnaud Charlet <charlet@adacore.com> * sem_ch12.adb (Mark_Context): Removed, no longer needed. (Analyze_Package_Instantiation): No longer analyze systematically a generic body in CodePeer mode. * freeze.adb, sem_attr.adb: Update comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165081 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatcmd.adb')
-rw-r--r--gcc/ada/gnatcmd.adb18
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index 855a08dcf0a..a91653cb94d 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -377,6 +377,7 @@ procedure GNATCmd is
declare
Proj : Project_List;
+ File : String_Access;
begin
-- Gnatstack needs to add the .ci file for the binder generated
@@ -389,7 +390,6 @@ procedure GNATCmd is
if Check_Project (Proj.Project, Project) then
declare
Main : String_List_Id;
- File : String_Access;
begin
-- Include binder generated files for main programs
@@ -541,8 +541,7 @@ procedure GNATCmd is
end if;
if not Subunit then
- Last_Switches.Increment_Last;
- Last_Switches.Table (Last_Switches.Last) :=
+ File :=
new String'
(Get_Name_String
(Unit.File_Names
@@ -551,6 +550,11 @@ procedure GNATCmd is
(Get_Name_String
(Unit.File_Names (Impl).Display_File),
"ci"));
+
+ if Is_Regular_File (File.all) then
+ Last_Switches.Increment_Last;
+ Last_Switches.Table (Last_Switches.Last) := File;
+ end if;
end if;
end if;
@@ -562,8 +566,7 @@ procedure GNATCmd is
if Check_Project
(Unit.File_Names (Spec).Project, Project)
then
- Last_Switches.Increment_Last;
- Last_Switches.Table (Last_Switches.Last) :=
+ File :=
new String'
(Get_Name_String
(Unit.File_Names
@@ -572,6 +575,11 @@ procedure GNATCmd is
MLib.Fil.Ext_To
(Get_Name_String (Unit.File_Names (Spec).File),
"ci"));
+
+ if Is_Regular_File (File.all) then
+ Last_Switches.Increment_Last;
+ Last_Switches.Table (Last_Switches.Last) := File;
+ end if;
end if;
end if;