aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2003-10-24 15:02:42 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2003-10-24 15:02:42 +0200
commitb0f26df5db7c471770e7219881e9bfe85cd3a039 (patch)
tree897ca34543cba57ab757439fcdd09dd83b34f5e6 /gcc/ada/sem_ch12.adb
parentbf22935f99c213b406b368ccdbff2572a8d08df0 (diff)
downloadgcc-b0f26df5db7c471770e7219881e9bfe85cd3a039.zip
gcc-b0f26df5db7c471770e7219881e9bfe85cd3a039.tar.gz
gcc-b0f26df5db7c471770e7219881e9bfe85cd3a039.tar.bz2
re PR ada/12014 (strcpy used with overlapping arguments)
* adadecode.c (ostrcpy): New function. (__gnat_decode): Use ostrcpy of strcpy. (has_prefix): Set first parameter a const. (has_suffix): Set first parameter a const. Update copyright notice. Fix source name in header. Removes a trailing space. PR ada/12014. * exp_disp.adb: Remove the test against being in No_Run_Time_Mode before generating a call to Register_Tag. It is redundant with the test against the availability of the function Register_Tag. * g-catiio.adb: (Month_Name): Correct spelling of February * make.adb: (Mains): New package (Initialize): Call Mains.Delete (Gnatmake): Check that each main on the command line is a source of a project file and, if there are several mains, each of them is a source of the same project file. (Gnatmake): When a foreign language is specified in attribute Languages, no main is specified on the command line and attribute Mains is not empty, only build the Ada main. If there is no Ada main, just compile the Ada sources and their closure. (Gnatmake): If a main is specified on the command line with directory information, check that the source exists and, if it does, that the path is the actual path of a source of a project. * prj-env.adb: (File_Name_Of_Library_Unit_Body): New Boolean parameter Full_Path. When Full_Path is True, return the full path instead of the simple file name. (Project_Of): New function * prj-env.ads: (File_Name_Of_Library_Unit_Body): New Boolean parameter Full_Path, defaulted to False. (Project_Of): New function * Makefile.generic: Ensure objects of main project are always checked and rebuilt if needed. Set CC to gcc by default. Prepare new handling of link by creating a global archive (not activated yet). * adadecode.h, atree.h, elists.h, nlists.h, raise.h, stringt.h: Update copyright notice. Remove trailing blanks. Fix source name in header. * sem_ch12.adb: Minor reformatting * sem_ch3.adb: Minor reformatting (including new function return style throughout) * sem_ch3.ads: Minor reformatting (including new function return style throughout) * Make-lang.in: Makefile automatically updated From-SVN: r72893
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index e252841..60dbbe5 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -7688,7 +7688,6 @@ package body Sem_Ch12 is
or else
Ekind (Get_Instance_Of (A_Gen_T)) = E_Record_Type_With_Private
then
-
-- Check whether the parent is another derived formal type
-- in the same generic unit.
@@ -7697,19 +7696,19 @@ package body Sem_Ch12 is
and then Scope (Etype (A_Gen_T)) = Scope (A_Gen_T)
and then Etype (Etype (A_Gen_T)) /= Etype (A_Gen_T)
then
-
-- Locate ancestor of parent from the subtype declaration
-- created for the actual.
declare
Decl : Node_Id;
+
begin
Decl := First (Actual_Decls);
while (Present (Decl)) loop
if Nkind (Decl) = N_Subtype_Declaration
- and then Chars (Defining_Identifier (Decl))
- = Chars (Etype (A_Gen_T))
+ and then Chars (Defining_Identifier (Decl)) =
+ Chars (Etype (A_Gen_T))
then
Ancestor := Generic_Parent_Type (Decl);
exit;