diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-12 16:01:16 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-12 16:01:16 +0000 |
commit | 738ec25bf5587f1266fbd09cb0810a0f88eabadf (patch) | |
tree | 6947b25f5f34c7ae96aa0a29be8ed4aed928a2e6 /gcc/ada/sem_ch13.adb | |
parent | 0122d6ddacef438391b60046d015378f4f88a95e (diff) | |
download | gcc-738ec25bf5587f1266fbd09cb0810a0f88eabadf.tar.gz |
2017-01-12 Tristan Gingold <gingold@adacore.com>
* s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
2017-01-12 Yannick Moy <moy@adacore.com>
* errout.adb, errout.ads (Initialize): Factor common treatment
in Reset_Warnings.
(Reset_Warnings): New procedure to reset counts related to warnings.
(Record_Compilation_Errors): New variable to store the presence of an
error, used in gnat2why to allow changing the Warning_Mode.
(Compilation_Errors): Use new variable Record_Compilation_Errors to
store the presence of an error.
2017-01-12 Javier Miranda <miranda@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications):
For Interrupt_Handler and Attach_ Handler aspects, decorate the
internally built reference to the protected procedure as coming
from sources and force its analysis.
2017-01-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
inherit predicates if any from the first_subtype of the parent,
not from the anonymous parent type.
* sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
predicate is not a static subtype.
2017-01-12 Gary Dismukes <dismukes@adacore.com>
* freeze.adb (Check_Suspicious_Convention): New procedure
performing a warning check on discriminated record types with
convention C or C++. Factored out of procedure Freeze_Record_Type,
and changed to only apply to base types (to avoid spurious
warnings on subtypes). Minor improvement of warning messages
to refer to discriminated rather than variant record types.
(Freeze_Record_Type): Remove code for performing a suspicious
convention check.
(Freeze_Entity): Only call Freeze_Record_Type
on types that aren't declared within any enclosing generic units
(rather than just excluding the type when the innermost scope
is generic). Call Check_Suspicious_Convention whether or not
the type is declared within a generic unit.
* sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
* sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
from Sem_Ch8).
2017-01-12 Tristan Gingold <gingold@adacore.com>
* sysdep.c, adaint.c, rtinit.c, ming32.h:
(__gnat_current_codepage): Renamed from CurrentCodePage
(__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
2017-01-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
quantified expressions, following AI12-050: the loop parameters
of two quantified expressions are conformant if they have the
same identifier.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244369 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r-- | gcc/ada/sem_ch13.adb | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 7a23005fae2..a88f8486d80 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -59,10 +59,10 @@ with Sem_Res; use Sem_Res; with Sem_Type; use Sem_Type; with Sem_Util; use Sem_Util; with Sem_Warn; use Sem_Warn; +with Sinfo; use Sinfo; with Sinput; use Sinput; with Snames; use Snames; with Stand; use Stand; -with Sinfo; use Sinfo; with Targparm; use Targparm; with Ttypes; use Ttypes; with Tbuild; use Tbuild; @@ -1888,7 +1888,7 @@ package body Sem_Ch13 is Set_From_Aspect_Specification (Aitem); end Make_Aitem_Pragma; - -- Start of processing for Analyze_Aspect_Specifications + -- Start of processing for Analyze_One_Aspect begin -- Skip aspect if already analyzed, to avoid looping in some cases @@ -1934,8 +1934,25 @@ package body Sem_Ch13 is Set_Analyzed (Aspect); Set_Entity (Aspect, E); + + -- Build the reference to E that will be used in the built pragmas + Ent := New_Occurrence_Of (E, Sloc (Id)); + if A_Id = Aspect_Attach_Handler + or else A_Id = Aspect_Interrupt_Handler + then + -- Decorate the reference as comming from the sources and force + -- its reanalysis to generate the reference to E; required to + -- avoid reporting spurious warning on E as unreferenced entity + -- (because aspects are not fully analyzed). + + Set_Comes_From_Source (Ent, Comes_From_Source (Id)); + Set_Entity (Ent, Empty); + + Analyze (Ent); + end if; + -- Check for duplicate aspect. Note that the Comes_From_Source -- test allows duplicate Pre/Post's that we generate internally -- to escape being flagged here. |