From: pmderodat Date: Tue, 21 Aug 2018 14:46:54 +0000 (+0000) Subject: [Ada] Unnesting: do not emit warnings for access to subprograms X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74d7986444e4756b297a113ee34415bf844d34a4;p=thirdparty%2Fgcc.git [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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263720 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d0ad28d3ebad..9737c0723944 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 9979cbf71e1b..ea9454a98151 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);