From c7fafef9742fac01de19c1422d769eeb9b368109 Mon Sep 17 00:00:00 2001 From: Ed Schonberg Date: Tue, 21 Aug 2018 14:46:54 +0000 Subject: [PATCH] [Ada] Unnesting: do not emit warnings for access to subprograms 2018-08-21 Ed Schonberg gcc/ada/ * freeze.adb: Remove warnings for access to subprograms when unnesting is active. From-SVN: r263720 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/freeze.adb | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d0ad28d3eba..9737c072394 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-08-21 Ed Schonberg + + * freeze.adb: Remove warnings for access to subprograms when + unnesting is active. + 2018-08-21 Ed Schonberg * exp_aggr.adb (Expand_Array_Aggregate): If the component type diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 9979cbf71e1..ea9454a9815 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -3611,10 +3611,14 @@ package body Freeze is Error_Msg_Qual_Level := 1; - -- Check suspicious use of fat C pointer + -- Check suspicious use of fat C pointer, but do not emit + -- a warning on an access to subprogram when unnesting is + -- active. if Is_Access_Type (F_Type) and then Esize (F_Type) > Ttypes.System_Address_Size + and then (not Unnest_Subprogram_Mode + or else not Is_Access_Subprogram_Type (F_Type)) then Error_Msg_N ("?x?type of & does not correspond to C pointer!", Formal); -- 2.30.2