diff options
Diffstat (limited to 'gcc/ada/style.adb')
-rw-r--r-- | gcc/ada/style.adb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ada/style.adb b/gcc/ada/style.adb index d3f2d2c99cc..e58d5052d70 100644 --- a/gcc/ada/style.adb +++ b/gcc/ada/style.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2015, 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- -- @@ -264,10 +264,13 @@ package body Style is begin -- Perform the check on source subprograms and on subprogram instances, -- because these can be primitives of untagged types. Note that such - -- indicators were introduced in Ada 2005. + -- indicators were introduced in Ada 2005. We apply Comes_From_Source + -- to Original_Node to catch the case of a procedure body declared with + -- "is null" that has been rewritten as a normal empty body. if Style_Check_Missing_Overriding - and then (Comes_From_Source (N) or else Is_Generic_Instance (E)) + and then (Comes_From_Source (Original_Node (N)) + or else Is_Generic_Instance (E)) and then Ada_Version_Explicit >= Ada_2005 then -- If the subprogram is an instantiation, its declaration appears |