diff options
author | Ed Schonberg <schonberg@adacore.com> | 2009-04-22 10:11:00 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-22 12:11:00 +0200 |
commit | f3a67cfc20021148306054463c9654199ba901d5 (patch) | |
tree | efe68ba58667e8b31a2bb078cde6c3002d8fe676 /gcc/ada/errout.adb | |
parent | 1ef4d0a80a0f685d97c032717c90032f9793f3af (diff) | |
download | gcc-f3a67cfc20021148306054463c9654199ba901d5.zip gcc-f3a67cfc20021148306054463c9654199ba901d5.tar.gz gcc-f3a67cfc20021148306054463c9654199ba901d5.tar.bz2 |
lib-load.ads, [...] (Make_Child_Decl_Unit): New subprogram...
2009-04-22 Ed Schonberg <schonberg@adacore.com>
* lib-load.ads, lib-load.adb (Make_Child_Decl_Unit): New subprogram, to
create a unit table entry for the subprogram declaration created for a
child suprogram body that has no separate specification.
* sem_ch10.adb (Analyze_Compilation_Unit): For a child unit that is a
subprogram body, call Make_Child_Decl_Unit.
* lib.adb (Get_Cunit_Unit_Number): Verify that an entry not yet in the
table can only be the created specification of a child subprogram body
that is the main unit, which has not been entered in the table yet.
* errout.adb (Output_Messages): Ignore created specification of a
child subprogram body to prevent repeated listing of error messages.
* gnat1drv.adb (gnat1drv): The generated specification for a child
subprogram body does not generate code.
From-SVN: r146559
Diffstat (limited to 'gcc/ada/errout.adb')
-rw-r--r-- | gcc/ada/errout.adb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb index d2c1cae..76d465a 100644 --- a/gcc/ada/errout.adb +++ b/gcc/ada/errout.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2009, 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- -- @@ -1681,11 +1681,21 @@ package body Errout is -- First list extended main source file units with errors - -- Note: if debug flag d.m is set, only the main source is listed - for U in Main_Unit .. Last_Unit loop if In_Extended_Main_Source_Unit (Cunit_Entity (U)) + + -- If debug flag d.m is set, only the main source is listed + and then (U = Main_Unit or else not Debug_Flag_Dot_M) + + -- If the unit of the entity does not come from source, it is + -- an implicit subprogram declaration for a child subprogram. + -- Do not emit errors for it, they are listed with the body. + + and then + (No (Cunit_Entity (U)) + or else Comes_From_Source (Cunit_Entity (U)) + or else not Is_Subprogram (Cunit_Entity (U))) then declare Sfile : constant Source_File_Index := Source_Index (U); |