From: Javier Miranda Date: Mon, 4 Aug 2008 15:34:13 +0000 (+0200) Subject: sem_prag.adb (Process_Convention): Add missing support for N_Private_Extension_Declar... X-Git-Tag: releases/gcc-4.4.0~3401 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f2131422e4e24a474ceb16e9781f9e0508ead720;p=thirdparty%2Fgcc.git sem_prag.adb (Process_Convention): Add missing support for N_Private_Extension_Declaration nodes. 2008-08-04 Javier Miranda * sem_prag.adb (Process_Convention): Add missing support for N_Private_Extension_Declaration nodes. From-SVN: r138637 --- diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 3ad8ff5d21ba..c1c661b08c01 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -1281,10 +1281,10 @@ package body Sem_Prag is -- sequence, so the only way we get here is by being in the -- declarative part of the body. - elsif Nkind (P) = N_Subprogram_Body - or else Nkind (P) = N_Package_Body - or else Nkind (P) = N_Task_Body - or else Nkind (P) = N_Entry_Body + elsif Nkind_In (P, N_Subprogram_Body, + N_Package_Body, + N_Task_Body, + N_Entry_Body) then return; end if; @@ -2497,7 +2497,8 @@ package body Sem_Prag is end if; E := Alias (E); - elsif Nkind (Parent (E)) = N_Full_Type_Declaration + elsif Nkind_In (Parent (E), N_Full_Type_Declaration, + N_Private_Extension_Declaration) and then Scope (E) = Scope (Alias (E)) then E := Alias (E); @@ -2626,7 +2627,7 @@ package body Sem_Prag is and then Comp_Unit = Get_Source_Unit (E1) and then not Is_Formal_Subprogram (E1) and then Nkind (Original_Node (Parent (E1))) /= - N_Full_Type_Declaration + N_Full_Type_Declaration then if Present (Alias (E1)) and then Scope (E1) /= Scope (Alias (E1)) @@ -2966,9 +2967,8 @@ package body Sem_Prag is -- Pragma cannot apply to subprogram body if Is_Subprogram (Def_Id) - and then - Nkind (Parent - (Declaration_Node (Def_Id))) = N_Subprogram_Body + and then Nkind (Parent (Declaration_Node (Def_Id))) = + N_Subprogram_Body then Error_Pragma ("pragma% requires separate spec" @@ -3505,10 +3505,8 @@ package body Sem_Prag is if Present (Decl) and then Nkind (Decl) = N_Subprogram_Declaration and then Present (Corresponding_Body (Decl)) - and then - Nkind - (Unit_Declaration_Node - (Corresponding_Body (Decl))) = + and then Nkind (Unit_Declaration_Node + (Corresponding_Body (Decl))) = N_Subprogram_Renaming_Declaration then Error_Msg_Sloc := Sloc (Def_Id);