diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-14 15:46:36 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-14 15:46:36 +0200 |
commit | 51bf9bdffff02529ce6331fda689e0d2fde3100f (patch) | |
tree | a0283a841af37f2fc802a622bdd4010911b38019 /gcc/ada/sem_ch6.adb | |
parent | ae24748803fb1d0de3fd2f3c2f0f8363dc14417f (diff) | |
download | gcc-51bf9bdffff02529ce6331fda689e0d2fde3100f.tar.gz |
[multiple changes]
2010-06-14 Robert Dewar <dewar@adacore.com>
* opt.ads (Check_Policy_List): Add some clarifying comments
* sem_prag.adb (Analyze_Pragma, case Check): Set Pragma_Enabled flag
on rewritten Assert pragma.
2010-06-14 Gary Dismukes <dismukes@adacore.com>
* sem_ch6.adb (Check_Overriding_Indicator): Add a special check for
controlled operations, so that they will be treated as overriding even
if the overridden subprogram is marked Is_Hidden, as long as the
overridden subprogram's parent subprogram is not hidden.
2010-06-14 Robert Dewar <dewar@adacore.com>
* debug.adb: Entry for gnatw.d no longer specific for while loops
* einfo.adb (First_Exit_Statement): New attribute for E_Loop
* einfo.ads (First_Exit_Statement): New attribute for E_Loop
* sem_ch5.adb (Analyze_Loop_Statement): Check_Infinite_Loop_Warning has
new calling sequence to include test for EXIT WHEN.
(Analyze_Exit_Statement): Chain EXIT statement into exit statement chain
* sem_warn.ads, sem_warn.adb (Check_Infinite_Loop_Warning): Now handles
EXIT WHEN case.
* sinfo.adb (Next_Exit_Statement): New attribute of N_Exit_Statement
node.
* sinfo.ads (N_Pragma): Correct comment on Sloc field (points to
PRAGMA, not to pragma identifier).
(Next_Exit_Statement): New attribute of N_Exit_Statement node
2010-06-14 Robert Dewar <dewar@adacore.com>
* sem_res.adb (Resolve_Short_Circuit): Fix sloc of "assertion/check
would fail" msg.
2010-06-14 Robert Dewar <dewar@adacore.com>
* par-ch2.adb (Scan_Pragma_Argument_Association): Clarify message for
missing pragma argument identifier.
2010-06-14 Robert Dewar <dewar@adacore.com>
* atree.ads, atree.adb (Ekind_In): New functions
2010-06-14 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**N in stand alone context
2010-06-14 Robert Dewar <dewar@adacore.com>
* usage.adb (Usage): Redo documentation of -gnatwa.
From-SVN: r160743
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r-- | gcc/ada/sem_ch6.adb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index a263d827816..befa1d48e97 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -4420,8 +4420,24 @@ package body Sem_Ch6 is end; end if; + -- If there is an overridden subprogram, then check that there is not + -- a "not overriding" indicator, and mark the subprogram as overriding. + -- This is not done if the overridden subprogram is marked as hidden, + -- which can occur for the case of inherited controlled operations + -- (see Derive_Subprogram), unless the inherited subprogram's parent + -- subprogram is not itself hidden. (Note: This condition could probably + -- be simplified, leaving out the testing for the specific controlled + -- cases, but it seems safer and clearer this way, and echoes similar + -- special-case tests of this kind in other places.) + if Present (Overridden_Subp) - and then not Is_Hidden (Overridden_Subp) + and then (not Is_Hidden (Overridden_Subp) + or else + ((Chars (Overridden_Subp) = Name_Initialize + or else Chars (Overridden_Subp) = Name_Adjust + or else Chars (Overridden_Subp) = Name_Finalize) + and then Present (Alias (Overridden_Subp)) + and then not Is_Hidden (Alias (Overridden_Subp)))) then if Must_Not_Override (Spec) then Error_Msg_Sloc := Sloc (Overridden_Subp); |