As for calls, issuing the -gnatw.x warning on every generic instantiation
results in way too many false positives and thus needs to be stopped.

Tested on x86_64-pc-linux-gnu, committed on trunk

2017-11-09  Eric Botcazou  <ebotca...@adacore.com>

        * exp_ch11.adb (Possible_Local_Raise): Do not issue the warning for
        generic instantiations either.

Index: exp_ch11.adb
===================================================================
--- exp_ch11.adb        (revision 254563)
+++ exp_ch11.adb        (working copy)
@@ -1855,11 +1855,13 @@
          --  and the warning is enabled, generate the appropriate warnings.
 
          --  ??? Do not do it for the Call_Marker nodes inserted by the ABE
-         --  mechanism because this generates too many false positives.
+         --  mechanism because this generates too many false positives, or
+         --  for generic instantiations for the same reason.
 
          elsif Warn_On_Non_Local_Exception
            and then Restriction_Active (No_Exception_Propagation)
            and then Nkind (N) /= N_Call_Marker
+           and then Nkind (N) not in N_Generic_Instantiation
          then
             Warn_No_Exception_Propagation_Active (N);
 

Reply via email to