From: Robert Dewar Date: Mon, 14 Apr 2008 15:01:42 +0000 (+0000) Subject: sem_util.ads, [...] (In_Subprogram): Remove. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8f3723e0ae9d77ba02984c0dec5eaf03cd034437;p=gcc.git sem_util.ads, [...] (In_Subprogram): Remove. 2008-04-14 Robert Dewar gcc/ada/ * sem_util.ads, sem_util.adb (In_Subprogram): Remove. * sem_attr.adb (Anayze_Attribute): Check for Current_Subprogram directly. From-SVN: r134273 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5d37a15830a..199fe294a83 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2008-04-14 Robert Dewar + + * sem_util.ads, sem_util.adb (In_Subprogram): Remove. + * sem_attr.adb (Anayze_Attribute): Check for Current_Subprogram + directly. + 2008-04-14 Samuel Tardieu PR ada/18680 diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index ed52023e716..7550d90655d 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -3472,7 +3472,7 @@ package body Sem_Attr is Check_E0; Set_Etype (N, P_Type); - if not In_Subprogram then + if No (Current_Subprogram) then Error_Attr ("attribute % can only appear within subprogram", N); end if; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index e7a6658e88d..fd797ca6079 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -5374,15 +5374,6 @@ package body Sem_Util is return False; end In_Package_Body; - ------------------- - -- In_Subprogram -- - ------------------- - - function In_Subprogram return Boolean is - begin - return Current_Subprogram /= Empty; - end In_Subprogram; - -------------------------------------- -- In_Subprogram_Or_Concurrent_Unit -- -------------------------------------- diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 291e230f430..a5cb1db6694 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -590,12 +590,6 @@ package Sem_Util is function In_Package_Body return Boolean; -- Returns True if current scope is within a package body - function In_Subprogram return Boolean; - -- Determines if the current scope is within a subprogram compilation - -- unit (inside a subprogram declaration, subprogram body, or generic - -- subprogram declaration). The test is for appearing anywhere within - -- such a construct (that is it does not need to be directly within). - function In_Subprogram_Or_Concurrent_Unit return Boolean; -- Determines if the current scope is within a subprogram compilation -- unit (inside a subprogram declaration, subprogram body, or generic