diff options
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 3c8ca3d..ea1eab3 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -3555,7 +3555,15 @@ package body Sem_Prag is Set_Is_Public (E); Set_Is_Statically_Allocated (E); - if Warn_On_Export_Import then + -- Warn if the corresponding W flag is set and the pragma + -- comes from source. The latter may be not be true e.g. on + -- VMS where we expand export pragmas for exception codes + -- associated with imported or exported exceptions. We don't + -- want the user to be warned about something he didn't write. + + if Warn_On_Export_Import + and then Comes_From_Source (Arg) + then Error_Msg_NE ("?& has been made static as a result of Export", Arg, E); Error_Msg_N |