From: Arnaud Charlet Date: Wed, 21 May 2014 13:08:13 +0000 (+0200) Subject: [multiple changes] X-Git-Tag: releases/gcc-5.1.0~7400 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23e28b42173b30e3ebe2b8e5765b01dc7fd60da2;p=thirdparty%2Fgcc.git [multiple changes] 2014-05-21 Robert Dewar * sem_elab.adb, prj-dect.adb: Minor reformatting. 2014-05-21 Robert Dewar * erroutc.ads: Minor comment addition. 2014-05-21 Robert Dewar * errout.ads: Add documentation for use of >*> tag. * restrict.adb: Make sure we use >*> tag for restriction warnings. 2014-05-21 Gary Dismukes * debug.adb: Add case of illegal overriding_indicator for a protected subprogram body to description of -gnatd.E switch. * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message for cases of giving overriding_indicators on protected subprogram bodies, but change this to a warning if -gnatd.E is enabled. No longer give a style warning about missing indicators on protected subprogram bodies. From-SVN: r210704 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 77294463ff69..d65b3b0ac4c2 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,26 @@ +2014-05-21 Robert Dewar + + * sem_elab.adb, prj-dect.adb: Minor reformatting. + +2014-05-21 Robert Dewar + + * erroutc.ads: Minor comment addition. + +2014-05-21 Robert Dewar + + * errout.ads: Add documentation for use of >*> tag. + * restrict.adb: Make sure we use >*> tag for restriction warnings. + +2014-05-21 Gary Dismukes + + * debug.adb: Add case of illegal overriding_indicator for a + protected subprogram body to description of -gnatd.E switch. + * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message + for cases of giving overriding_indicators on protected subprogram + bodies, but change this to a warning if -gnatd.E is enabled. No + longer give a style warning about missing indicators on protected + subprogram bodies. + 2014-05-21 Robert Dewar * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb, diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index f2f118bb5948..d5fae2774c60 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -614,6 +614,11 @@ package body Debug is -- -- Errors relating to the new rules about not defining equality -- too late so that composition of equality can be assured. + -- + -- Errors relating to overriding indicators on protected subprogram + -- bodies (not an Ada 2012 incompatibility, but might cause errors + -- for existing programs assuming they were legal because GNAT + -- formerly allowed them). -- d.F Sets GNATprove_Mode to True. This allows debugging the frontend in -- the special mode used by GNATprove. diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads index 8c561fb5c2d1..a42d3dba75c1 100644 --- a/gcc/ada/errout.ads +++ b/gcc/ada/errout.ads @@ -312,10 +312,10 @@ package Errout is -- Insertion character < (Less Than: conditional warning message) -- The character < appearing anywhere in a message is used for a -- conditional error message. If Error_Msg_Warn is True, then the - -- effect is the same as ? described above, and in particular << and - -- &`#", N); end if; end Check_Restriction_No_Use_Of_Attribute; @@ -336,7 +336,7 @@ package body Restrict is Error_Msg_Node_1 := Id; Error_Msg_Warn := No_Use_Of_Pragma_Warning (P_Id); Error_Msg_N - (" &`#", Id); end if; end Check_Restriction_No_Use_Of_Pragma; @@ -645,7 +645,7 @@ package body Restrict is if No_Dependences.Table (J).Warn then Error_Msg - ("??violation of restriction `No_Dependence '='> &`#", + ("?*?violation of restriction `No_Dependence '='> &`#", Sloc (Err)); else Error_Msg @@ -691,7 +691,7 @@ package body Restrict is Error_Msg_Node_1 := Id; Error_Msg_Warn := No_Specification_Of_Aspect_Warning (A_Id); Error_Msg_N - (" &`#", Id); end if; end Check_Restriction_No_Specification_Of_Aspect; diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 0c2bdf4e8d7d..a3364b8e8320 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -2782,6 +2782,16 @@ package body Sem_Ch6 is elsif not Present (Overridden_Operation (Spec_Id)) then Error_Msg_NE ("subprogram& is not overriding", Body_Spec, Spec_Id); + + -- Overriding indicators aren't allowed for protected subprogram + -- bodies (see the Confirmation in Ada Comment AC95-00213). Change + -- this to a warning if -gnatd.E is enabled. + + elsif Ekind (Scope (Spec_Id)) = E_Protected_Type then + Error_Msg_Warn := Error_To_Warning; + Error_Msg_N + ("