sem_prag.adb: (Analyze_Pragma...
authorEd Schonberg <schonber@gnat.com>
Thu, 11 Oct 2001 00:19:12 +0000 (00:19 +0000)
committerGeert Bosch <bosch@gcc.gnu.org>
Thu, 11 Oct 2001 00:19:12 +0000 (02:19 +0200)
* sem_prag.adb: (Analyze_Pragma, case External): If entity is a
constant, do not indicate possible modification, so that gigi can
treat it as a bona fide constant.

From-SVN: r46168

gcc/ada/ChangeLog
gcc/ada/sem_prag.adb

index 4c595c72ad598ddb593d686dc78a66338e16cbdd..529a6a34340e9ecc311675850b01ef33863c66a5 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-10  Ed Schonberg <schonber@gnat.com>
+
+       * sem_prag.adb: (Analyze_Pragma, case External): If entity is a 
+       constant, do not indicate possible modification, so that gigi can 
+       treat it as a bona fide constant.
+
 2001-10-10  Robert Dewar <dewar@gnat.com>
 
        * sem_prag.adb: Add processing for pragma External.
index 73a4b08aada2d5b9d2ba4f6ee107d8e9b0da90ad..3c547c8433012c21dbee24554e7b8e728d4d1441 100644 (file)
@@ -5021,7 +5021,11 @@ package body Sem_Prag is
             Check_At_Least_N_Arguments (2);
             Check_At_Most_N_Arguments  (4);
             Process_Convention (C, Def_Id);
-            Note_Possible_Modification (Expression (Arg2));
+
+            if Ekind (Def_Id) /= E_Constant then
+               Note_Possible_Modification (Expression (Arg2));
+            end if;
+
             Process_Interface_Name (Def_Id, Arg3, Arg4);
             Set_Exported (Def_Id, Arg2);
          end Export;