aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/freeze.adb6
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index d0ad28d..9737c07 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2018-08-21 Ed Schonberg <schonberg@adacore.com>
+ * freeze.adb: Remove warnings for access to subprograms when
+ unnesting is active.
+
+2018-08-21 Ed Schonberg <schonberg@adacore.com>
+
* exp_aggr.adb (Expand_Array_Aggregate): If the component type
is limited, the array must be constructed in place, so set flag
In_Place_Assign_OK_For_Declaration accordingly. This prevents
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 9979cbf..ea9454a 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);