diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-06 08:12:36 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-06 08:12:36 +0000 |
commit | 3f3f8d796bbcbacbfd9b9cf760774c2a7ec26ad4 (patch) | |
tree | 0420816519850b703f2f1b48c34c54fdb39b1adb /gcc/ada/sem_ch6.adb | |
parent | 958b0dc0510c358e6cd887dfc895bc5883ab42bf (diff) | |
download | gcc-3f3f8d796bbcbacbfd9b9cf760774c2a7ec26ad4.tar.gz |
2012-08-06 Robert Dewar <dewar@adacore.com>
* sem_ch6.adb: Remove useless flag Body_Deleted.
2012-08-06 Thomas Quinot <quinot@adacore.com>
* sinfo.ads (End_Span): Change default from No_Uint to Uint_0,
as this is what all usage occurrences of this attribute are
expecting.
* uintp.adb (UI_To_Int): Add assertion to guard against calling
with No_Uint.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190164 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r-- | gcc/ada/sem_ch6.adb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 5f061616ee3..d48dd10e524 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -1804,7 +1804,6 @@ package body Sem_Ch6 is procedure Analyze_Subprogram_Body_Helper (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); - Body_Deleted : constant Boolean := False; Body_Spec : constant Node_Id := Specification (N); Body_Id : Entity_Id := Defining_Entity (Body_Spec); Prev_Id : constant Entity_Id := Current_Entity_In_Scope (Body_Id); @@ -2076,9 +2075,8 @@ package body Sem_Ch6 is Set_Has_Missing_Return (Id); end if; - elsif (Is_Generic_Subprogram (Id) - or else not Is_Machine_Code_Subprogram (Id)) - and then not Body_Deleted + elsif Is_Generic_Subprogram (Id) + or else not Is_Machine_Code_Subprogram (Id) then Error_Msg_N ("missing RETURN statement in function body", N); end if; @@ -3133,13 +3131,9 @@ package body Sem_Ch6 is end loop; end if; - -- Check references in body unless it was deleted. Note that the - -- check of Body_Deleted here is not just for efficiency, it is - -- necessary to avoid junk warnings on formal parameters. + -- Check references in body - if not Body_Deleted then - Check_References (Body_Id); - end if; + Check_References (Body_Id); end; end Analyze_Subprogram_Body_Helper; |