diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-30 15:06:14 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-30 15:06:14 +0000 |
commit | 0095e7f0b29432e1a79956375dacbb5a52ddcde9 (patch) | |
tree | 8432c210f1c0904e02463c384d2865634f6ba147 /gcc/ada/sem_ch3.adb | |
parent | 097c00c78fa774d50a6671741e6144dc9480eeef (diff) | |
download | gcc-0095e7f0b29432e1a79956375dacbb5a52ddcde9.tar.gz |
2015-01-30 Gary Dismukes <dismukes@adacore.com>
* freeze.adb: Minor reformatting.
2015-01-30 Javier Miranda <miranda@adacore.com>
* errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
improve its documentation.
* errout.adb (Error_Msg_PT): Improve the error message.
* sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
(Check_Synchronized_Overriding): Update call to Error_Msg_PT.
* sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
2015-01-30 Robert Dewar <dewar@adacore.com>
* sem_warn.adb (Warn_On_Known_Condition): Do special casing of
message for False case.
2015-01-30 Doug Rupp <rupp@adacore.com>
* s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
* s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
kernel.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220284 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
-rw-r--r-- | gcc/ada/sem_ch3.adb | 58 |
1 files changed, 23 insertions, 35 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 0a97caaf999..7699a6fc80f 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -10050,46 +10050,34 @@ package body Sem_Ch3 is elsif Is_Concurrent_Record_Type (T) and then Present (Interfaces (T)) then - -- If an inherited subprogram is implemented by a protected - -- procedure or an entry, then the first parameter of the - -- inherited subprogram shall be of mode OUT or IN OUT, or - -- an access-to-variable parameter (RM 9.4(11.9/3)) - - if Is_Protected_Type (Corresponding_Concurrent_Type (T)) - and then Ekind (First_Formal (Subp)) = E_In_Parameter - and then Ekind (Subp) /= E_Function - and then not Is_Predefined_Dispatching_Operation (Subp) - then - Error_Msg_PT (T, Subp); - - -- Some other kind of overriding failure + -- There is no need to check here RM 9.4(11.9/3) since we + -- are processing the corresponding record type and the + -- mode of the overriding subprograms was verified by + -- Check_Conformance when the corresponding concurrent + -- type declaration was analyzed. - else - Error_Msg_NE - ("interface subprogram & must be overridden", - T, Subp); + Error_Msg_NE + ("interface subprogram & must be overridden", T, Subp); - -- Examine primitive operations of synchronized type, - -- to find homonyms that have the wrong profile. + -- Examine primitive operations of synchronized type to find + -- homonyms that have the wrong profile. - declare - Prim : Entity_Id; + declare + Prim : Entity_Id; - begin - Prim := - First_Entity (Corresponding_Concurrent_Type (T)); - while Present (Prim) loop - if Chars (Prim) = Chars (Subp) then - Error_Msg_NE - ("profile is not type conformant with " - & "prefixed view profile of " - & "inherited operation&", Prim, Subp); - end if; + begin + Prim := First_Entity (Corresponding_Concurrent_Type (T)); + while Present (Prim) loop + if Chars (Prim) = Chars (Subp) then + Error_Msg_NE + ("profile is not type conformant with prefixed " + & "view profile of inherited operation&", + Prim, Subp); + end if; - Next_Entity (Prim); - end loop; - end; - end if; + Next_Entity (Prim); + end loop; + end; end if; else |