diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-14 14:23:26 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-14 14:23:26 +0200 |
commit | 689cb4acaa076bc1e537298fe71c00102e58e782 (patch) | |
tree | 2cfaaf84972906981f1f51659b9dda276a7db361 /gcc | |
parent | c1e822d590c3841514118cc79284e466ac31125f (diff) | |
download | gcc-689cb4acaa076bc1e537298fe71c00102e58e782.zip gcc-689cb4acaa076bc1e537298fe71c00102e58e782.tar.gz gcc-689cb4acaa076bc1e537298fe71c00102e58e782.tar.bz2 |
[multiple changes]
2010-06-14 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Derive_Subprograms): Remove over-restrictive assertion.
2010-06-14 Arnaud Charlet <charlet@adacore.com>
* ali.adb: Fix typo.
* s-auxdec-vms-alpha.adb, scng.ads: Minor reformatting
2010-06-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb: Make Mark_Context transitive, and apply to subprogram
instances.
* sem_ch8.adb (Find_Expanded_Name): If a candidate compilation unit in
the context does not have a homonym of the selector, emit default
error message.
From-SVN: r160728
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/ada/ali.adb | 2 | ||||
-rw-r--r-- | gcc/ada/scng.ads | 8 | ||||
-rw-r--r-- | gcc/ada/sem_ch12.adb | 22 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 1 | ||||
-rw-r--r-- | gcc/ada/sem_ch8.adb | 8 |
6 files changed, 52 insertions, 7 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d58fc92..0bd3c49 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,21 @@ +2010-06-14 Javier Miranda <miranda@adacore.com> + + * sem_ch3.adb (Derive_Subprograms): Remove over-restrictive assertion. + +2010-06-14 Arnaud Charlet <charlet@adacore.com> + + * ali.adb: Fix typo. + * s-auxdec-vms-alpha.adb, scng.ads: Minor reformatting + +2010-06-14 Ed Schonberg <schonberg@adacore.com> + + * sem_ch12.adb: Make Mark_Context transitive, and apply to subprogram + instances. + + * sem_ch8.adb (Find_Expanded_Name): If a candidate compilation unit in + the context does not have a homonym of the selector, emit default + error message. + 2010-06-14 Robert Dewar <dewar@adacore.com> * sem.adb, sem_ch12.adb, sem_util.adb: Minor reformatting and diff --git a/gcc/ada/ali.adb b/gcc/ada/ali.adb index 7655dcc..a004956 100644 --- a/gcc/ada/ali.adb +++ b/gcc/ada/ali.adb @@ -205,7 +205,7 @@ package body ALI is -- -- If Ignore_Special is False (normal case), the scan is terminated by -- a typeref bracket or an equal sign except for the special case of - -- an operator name starting with a double quite which is terminated + -- an operator name starting with a double quote which is terminated -- by another double quote. -- -- It is an error to set both Ignore_Spaces and Ignore_Special to True. diff --git a/gcc/ada/scng.ads b/gcc/ada/scng.ads index abcf3da..1988e26 100644 --- a/gcc/ada/scng.ads +++ b/gcc/ada/scng.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2007, 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- -- @@ -23,9 +23,9 @@ -- -- ------------------------------------------------------------------------------ --- This package contains a generic lexical analyzer. This is used --- for scanning Ada source files or text files with an Ada-like syntax, --- such as project files. It is instantiated in Scn and Prj.Err. +-- This package contains a generic lexical analyzer. This is used for scanning +-- Ada source files or text files with an Ada-like syntax, such as project +-- files. It is instantiated in Scn and Prj.Err. with Casing; use Casing; with Styleg; diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index b201202..faff561 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -8875,6 +8875,7 @@ package body Sem_Ch12 is if Present (Gen_Body_Id) then Gen_Body := Unit_Declaration_Node (Gen_Body_Id); + Mark_Context (Inst_Node, Gen_Decl); if Nkind (Gen_Body) = N_Subprogram_Body_Stub then @@ -10410,6 +10411,27 @@ package body Sem_Ch12 is Next (Clause); end loop; + + -- If the instance appears within another instantiated unit, check + -- whether it appears in the main unit, and indicate the need for + -- the body of the enclosing instance as well. + + if In_Extended_Main_Code_Unit (Inst_Decl) + and then Instantiation_Location (Sloc (Inst_Decl)) /= No_Location + and then Present (Library_Unit (Cunit (Main_Unit))) + and then Cunit (Inst_CU) /= Library_Unit (Cunit (Main_Unit)) + then + Clause := First (Context_Items (Library_Unit (Cunit (Main_Unit)))); + while Present (Clause) loop + if Nkind (Clause) = N_With_Clause + and then Library_Unit (Clause) = Cunit (Gen_CU) + then + Set_Withed_Body (Clause, Cunit (Gen_CU)); + end if; + + Next (Clause); + end loop; + end if; end Mark_Context; --------------------- diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index f0463aa..eb22cb1 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -12814,7 +12814,6 @@ package body Sem_Ch3 is and then not Primitive_Names_Match (Subp, Act_Subp)) then pragma Assert (not Is_Ancestor (Parent_Base, Generic_Actual)); - pragma Assert (Is_Interface (Parent_Base)); -- Remember that we need searching for all the pending -- primitives diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 6a909c8..25f45a2 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -4785,11 +4785,17 @@ package body Sem_Ch8 is ("\use fully qualified name starting with" & " Standard to make& visible", N, H); Error_Msg_Qual_Level := 0; - exit; + goto Done; end if; Next_Entity (Id); end loop; + + -- If not found, standard error message. + + Error_Msg_NE ("& not declared in&", N, Selector); + + <<Done>> null; end; else |