aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-10-26 11:39:41 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2015-10-26 11:39:41 +0100
commit02886c2e8a6056b5e969f57431671d0980596f0b (patch)
tree49e526ca3aacced71bb9e4c9238a41de95737534 /gcc/ada/sem_ch13.adb
parent51022ff73102918ab0574d677b6d572a0cb2c59b (diff)
downloadgcc-02886c2e8a6056b5e969f57431671d0980596f0b.zip
gcc-02886c2e8a6056b5e969f57431671d0980596f0b.tar.gz
gcc-02886c2e8a6056b5e969f57431671d0980596f0b.tar.bz2
2015-10-26 Joel Brobecker <brobecker@adacore.com brobecker>
* adaint.c (__gnat_lwp_self): Replace current implementation re-using the Linux one, which uses an __NR_gettid syscall rather than pthread_self. 2015-10-26 Arnaud Charlet <charlet@adacore.com> * sinfo.ads, exp_ch3.adb (Build_Array_Init_Proc, Build_Record_Init_Proc): Do not inline init procs when Modify_Tree_For_C is True. 2015-10-26 Bob Duff <duff@adacore.com> * errout.ads: Minor comment fix. * einfo.ads: Minor style fix. 2015-10-26 Bob Duff <duff@adacore.com> * sem_ch3.adb (Derive_Interface_Subprogram): Fix Is_Abstract_Subprogram, which might have been calculated incorrectly, because we're passing Ultimate_Alias (Subp) (and its dispatching type) to Derive_Subprogram, instead of the true parent subprogram and type. 2015-10-26 Bob Duff <duff@adacore.com> * sem_ch13.adb (Check_Iterator_Functions): When printing the "default iterator must be unique" error message, also print references to the places where the duplicates are declared. This makes the message clearer. From-SVN: r229320
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r--gcc/ada/sem_ch13.adb18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index e3b6bf7..06b5cf8 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -4219,8 +4219,6 @@ package body Sem_Ch13 is
------------------------------
procedure Check_Iterator_Functions is
- Default : Entity_Id;
-
function Valid_Default_Iterator (Subp : Entity_Id) return Boolean;
-- Check one possible interpretation for validity
@@ -4277,8 +4275,8 @@ package body Sem_Ch13 is
end if;
else
- Default := Empty;
declare
+ Default : Entity_Id := Empty;
I : Interp_Index;
It : Interp;
@@ -4292,6 +4290,10 @@ package body Sem_Ch13 is
elsif Present (Default) then
Error_Msg_N ("default iterator must be unique", Expr);
+ Error_Msg_Sloc := Sloc (Default);
+ Error_Msg_N ("\\possible interpretation#", Expr);
+ Error_Msg_Sloc := Sloc (It.Nam);
+ Error_Msg_N ("\\possible interpretation#", Expr);
else
Default := It.Nam;
@@ -4299,12 +4301,12 @@ package body Sem_Ch13 is
Get_Next_Interp (I, It);
end loop;
- end;
- if Present (Default) then
- Set_Entity (Expr, Default);
- Set_Is_Overloaded (Expr, False);
- end if;
+ if Present (Default) then
+ Set_Entity (Expr, Default);
+ Set_Is_Overloaded (Expr, False);
+ end if;
+ end;
end if;
end Check_Iterator_Functions;