diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-04-02 11:19:30 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-04-02 11:19:30 +0200 |
commit | e228f7eed275e585d48c92dc87bde3dd0784e4d2 (patch) | |
tree | a214a8cf48a012e0c7fbd60901426ba6143aedaf /gcc/ada/style.adb | |
parent | 99fc068ee807cc43779d775a3dda705f5f37c4f5 (diff) | |
download | gcc-e228f7eed275e585d48c92dc87bde3dd0784e4d2.zip gcc-e228f7eed275e585d48c92dc87bde3dd0784e4d2.tar.gz gcc-e228f7eed275e585d48c92dc87bde3dd0784e4d2.tar.bz2 |
[multiple changes]
2012-04-02 Yannick Moy <moy@adacore.com>
* lib-xref-alfa.adb: Code clean up.
2012-04-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Subprogram_Instantiation): Do not suppress
style checks, because the subprogram instance itself may contain
violations of syle rules.
* style.adb (Missing_Overriding): Check for missing overriding
indicator on a subprogram instance.
2012-04-02 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Last_Implicit_Declaration): New routine.
(Process_PPCs): Insert the body of _postconditions after the
last internally generated declaration. This ensures that actual
subtypes created for formal parameters are visible and properly
frozen as _postconditions may reference them.
From-SVN: r186070
Diffstat (limited to 'gcc/ada/style.adb')
-rw-r--r-- | gcc/ada/style.adb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ada/style.adb b/gcc/ada/style.adb index 727a0cd..b603702 100644 --- a/gcc/ada/style.adb +++ b/gcc/ada/style.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -236,7 +236,13 @@ package body Style is procedure Missing_Overriding (N : Node_Id; E : Entity_Id) is begin - if Style_Check_Missing_Overriding and then Comes_From_Source (N) then + + -- Perform the check on source subprograms and on subprogram instances, + -- because these can be primitives of untagged types. + + if Style_Check_Missing_Overriding + and then (Comes_From_Source (N) or else Is_Generic_Instance (E)) + then if Nkind (N) = N_Subprogram_Body then Error_Msg_NE -- CODEFIX ("(style) missing OVERRIDING indicator in body of&", N, E); |