OSDN Git Service

2012-02-09 Tristan Gingold <gingold@adacore.com>
authorgingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Feb 2012 10:40:19 +0000 (10:40 +0000)
committergingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Feb 2012 10:40:19 +0000 (10:40 +0000)
* gcc-interface/Makefile.in: Remove .sym rule (not used).
Remove adamsg.o object (requires native message compiler).
* init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
macro instead of as extern int.
(ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
(ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
(ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
(ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
(ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
(ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
(ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
(ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
(ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
(struct cond_except): Field cond is now an unsigned int.
(dec_ada_cond_except_table): Adjust.
(cond_except_table): Likewise.
(cond_resignal_table): Likewise.
(__gnat_default_resignal_p): Fix style.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184041 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/Makefile.in
gcc/ada/init.c

index 8fa6556..5b6372d 100644 (file)
@@ -1,3 +1,24 @@
+2012-02-09  Tristan Gingold  <gingold@adacore.com>
+
+       * gcc-interface/Makefile.in: Remove .sym rule (not used).
+       Remove adamsg.o object (requires native message compiler).
+       * init.c (CMA$_EXIT_THREAD, MTH$_FLOOVEMAT, SS$_INTDIV): Define as a
+       macro instead of as extern int.
+       (ADA$_ALREADY_OPEN, ADA$_CONSTRAINT_ERRO, ADA$_DATA_ERROR)
+       (ADA$_DEVICE_ERROR, ADA$_END_ERROR, ADA$_FAC_MODE_MISMAT)
+       (ADA$_IOSYSFAILED, ADA$_KEYSIZERR, ADA$_KEY_MISMATCH)
+       (ADA$_LAYOUT_ERROR, ADA$_LINEXCMRS, ADA$_MAXLINEXC)
+       (ADA$_MODE_ERROR, ADA$_MRN_MISMATCH, ADA$_MRS_MISMATCH)
+       (ADA$_NAME_ERROR, ADA$_NOT_OPEN, ADA$_ORG_MISMATCH)
+       (ADA$_PROGRAM_ERROR, ADA$_RAT_MISMATCH, ADA$_RFM_MISMATCH)
+       (ADA$_STAOVF, ADA$_STATUS_ERROR, ADA$_STORAGE_ERROR)
+       (ADA$_UNSUPPORTED, ADA$_USE_ERROR): Likewise.
+       (struct cond_except): Field cond is now an unsigned int.
+       (dec_ada_cond_except_table): Adjust.
+       (cond_except_table): Likewise.
+       (cond_resignal_table): Likewise.
+       (__gnat_default_resignal_p): Fix style.
+
 2012-02-08  Vincent Celier  <celier@adacore.com>
 
        * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
 2012-02-08  Vincent Celier  <celier@adacore.com>
 
        * gcc-interface/Make-lang.in: Add g-byorma.o to gnatbind objects
index 98b4c1e..4fb3ba7 100644 (file)
@@ -1487,10 +1487,6 @@ hyphen = _
 LN = cp -p
 LN_S = cp -p
 
 LN = cp -p
 LN_S = cp -p
 
-.SUFFIXES: .sym
-
-.o.sym:
-       @ gnu:[bin]vmssymvec $<
 endif
 
 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
 endif
 
 ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
@@ -1566,16 +1562,11 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
     endif
   endif
 
     endif
   endif
 
-adamsg.o: adamsg.msg
-       -$(DECC) --cc=message adamsg.msg -o adamsg.o
-
   EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
 
   GMEM_LIB = gmemlib
   EH_MECHANISM=-gcc
   GNATLIB_SHARED=gnatlib-shared-vms
   EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
 
   GMEM_LIB = gmemlib
   EH_MECHANISM=-gcc
   GNATLIB_SHARED=gnatlib-shared-vms
-  EXTRA_LIBGNAT_SRCS+=adamsg.msg
-  EXTRA_LIBGNAT_OBJS+=adamsg.o
   EXTRA_GNATRTL_NONTASKING_OBJS+=s-po32gl.o
   EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
   EXTRA_GNATTOOLS = \
   EXTRA_GNATRTL_NONTASKING_OBJS+=s-po32gl.o
   EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
   EXTRA_GNATTOOLS = \
index 9c11d6b..79c5c5b 100644 (file)
@@ -1117,12 +1117,12 @@ int __gnat_features_set = 0;
 
 /* These codes are in standard message libraries.  */
 extern int C$_SIGKILL;
 
 /* These codes are in standard message libraries.  */
 extern int C$_SIGKILL;
-extern int CMA$_EXIT_THREAD;
 extern int SS$_DEBUG;
 extern int SS$_DEBUG;
-extern int SS$_INTDIV;
 extern int LIB$_KEYNOTFOU;
 extern int LIB$_ACTIMAGE;
 extern int LIB$_KEYNOTFOU;
 extern int LIB$_ACTIMAGE;
-extern int MTH$_FLOOVEMAT;       /* Some ACVC_21 CXA tests */
+#define CMA$_EXIT_THREAD 4227492
+#define MTH$_FLOOVEMAT 1475268       /* Some ACVC_21 CXA tests */
+#define SS$_INTDIV 1156
 
 /* These codes are non standard, which is to say the author is
    not sure if they are defined in the standard message libraries
 
 /* These codes are non standard, which is to say the author is
    not sure if they are defined in the standard message libraries
@@ -1131,7 +1131,7 @@ extern int MTH$_FLOOVEMAT;       /* Some ACVC_21 CXA tests */
 #define FDL$_UNPRIKW 11829410
 
 struct cond_except {
 #define FDL$_UNPRIKW 11829410
 
 struct cond_except {
-  const int *cond;
+  unsigned int cond;
   const struct Exception_Data *except;
 };
 
   const struct Exception_Data *except;
 };
 
@@ -1181,76 +1181,73 @@ extern struct Exception_Data *Coded_Exception (Exception_Code);
 extern Exception_Code Base_Code_In (Exception_Code);
 
 /* DEC Ada exceptions are not defined in a header file, so they
 extern Exception_Code Base_Code_In (Exception_Code);
 
 /* DEC Ada exceptions are not defined in a header file, so they
-   must be declared as external addresses.  */
-
-extern int ADA$_PROGRAM_ERROR;
-extern int ADA$_LOCK_ERROR;
-extern int ADA$_EXISTENCE_ERROR;
-extern int ADA$_KEY_ERROR;
-extern int ADA$_KEYSIZERR;
-extern int ADA$_STAOVF;
-extern int ADA$_CONSTRAINT_ERRO;
-extern int ADA$_IOSYSFAILED;
-extern int ADA$_LAYOUT_ERROR;
-extern int ADA$_STORAGE_ERROR;
-extern int ADA$_DATA_ERROR;
-extern int ADA$_DEVICE_ERROR;
-extern int ADA$_END_ERROR;
-extern int ADA$_MODE_ERROR;
-extern int ADA$_NAME_ERROR;
-extern int ADA$_STATUS_ERROR;
-extern int ADA$_NOT_OPEN;
-extern int ADA$_ALREADY_OPEN;
-extern int ADA$_USE_ERROR;
-extern int ADA$_UNSUPPORTED;
-extern int ADA$_FAC_MODE_MISMAT;
-extern int ADA$_ORG_MISMATCH;
-extern int ADA$_RFM_MISMATCH;
-extern int ADA$_RAT_MISMATCH;
-extern int ADA$_MRS_MISMATCH;
-extern int ADA$_MRN_MISMATCH;
-extern int ADA$_KEY_MISMATCH;
-extern int ADA$_MAXLINEXC;
-extern int ADA$_LINEXCMRS;
+   must be declared.  */
+
+#define ADA$_ALREADY_OPEN      0x0031a594
+#define ADA$_CONSTRAINT_ERRO   0x00318324
+#define ADA$_DATA_ERROR                0x003192c4
+#define ADA$_DEVICE_ERROR      0x003195e4
+#define ADA$_END_ERROR         0x00319904
+#define ADA$_FAC_MODE_MISMAT   0x0031a8b3
+#define ADA$_IOSYSFAILED       0x0031af04
+#define ADA$_KEYSIZERR         0x0031aa3c
+#define ADA$_KEY_MISMATCH      0x0031a8e3
+#define ADA$_LAYOUT_ERROR      0x00319c24
+#define ADA$_LINEXCMRS         0x0031a8f3
+#define ADA$_MAXLINEXC         0x0031a8eb
+#define ADA$_MODE_ERROR                0x00319f44
+#define ADA$_MRN_MISMATCH      0x0031a8db
+#define ADA$_MRS_MISMATCH      0x0031a8d3
+#define ADA$_NAME_ERROR                0x0031a264
+#define ADA$_NOT_OPEN          0x0031a58c
+#define ADA$_ORG_MISMATCH      0x0031a8bb
+#define ADA$_PROGRAM_ERROR     0x00318964
+#define ADA$_RAT_MISMATCH      0x0031a8cb
+#define ADA$_RFM_MISMATCH      0x0031a8c3
+#define ADA$_STAOVF            0x00318cac
+#define ADA$_STATUS_ERROR      0x0031a584
+#define ADA$_STORAGE_ERROR     0x00318c84
+#define ADA$_UNSUPPORTED       0x0031a8ab
+#define ADA$_USE_ERROR         0x0031a8a4
 
 /* DEC Ada specific conditions.  */
 static const struct cond_except dec_ada_cond_except_table [] = {
 
 /* DEC Ada specific conditions.  */
 static const struct cond_except dec_ada_cond_except_table [] = {
-  {&ADA$_PROGRAM_ERROR,   &program_error},
-  {&ADA$_USE_ERROR,       &Use_Error},
-  {&ADA$_KEYSIZERR,       &program_error},
-  {&ADA$_STAOVF,          &storage_error},
-  {&ADA$_CONSTRAINT_ERRO, &constraint_error},
-  {&ADA$_IOSYSFAILED,     &Device_Error},
-  {&ADA$_LAYOUT_ERROR,    &Layout_Error},
-  {&ADA$_STORAGE_ERROR,   &storage_error},
-  {&ADA$_DATA_ERROR,      &Data_Error},
-  {&ADA$_DEVICE_ERROR,    &Device_Error},
-  {&ADA$_END_ERROR,       &End_Error},
-  {&ADA$_MODE_ERROR,      &Mode_Error},
-  {&ADA$_NAME_ERROR,      &Name_Error},
-  {&ADA$_STATUS_ERROR,    &Status_Error},
-  {&ADA$_NOT_OPEN,        &Use_Error},
-  {&ADA$_ALREADY_OPEN,    &Use_Error},
-  {&ADA$_USE_ERROR,       &Use_Error},
-  {&ADA$_UNSUPPORTED,     &Use_Error},
-  {&ADA$_FAC_MODE_MISMAT, &Use_Error},
-  {&ADA$_ORG_MISMATCH,    &Use_Error},
-  {&ADA$_RFM_MISMATCH,    &Use_Error},
-  {&ADA$_RAT_MISMATCH,    &Use_Error},
-  {&ADA$_MRS_MISMATCH,    &Use_Error},
-  {&ADA$_MRN_MISMATCH,    &Use_Error},
-  {&ADA$_KEY_MISMATCH,    &Use_Error},
-  {&ADA$_MAXLINEXC,       &constraint_error},
-  {&ADA$_LINEXCMRS,       &constraint_error},
-  {0,                     0}
+  {ADA$_PROGRAM_ERROR,   &program_error},
+  {ADA$_USE_ERROR,       &Use_Error},
+  {ADA$_KEYSIZERR,       &program_error},
+  {ADA$_STAOVF,          &storage_error},
+  {ADA$_CONSTRAINT_ERRO, &constraint_error},
+  {ADA$_IOSYSFAILED,     &Device_Error},
+  {ADA$_LAYOUT_ERROR,    &Layout_Error},
+  {ADA$_STORAGE_ERROR,   &storage_error},
+  {ADA$_DATA_ERROR,      &Data_Error},
+  {ADA$_DEVICE_ERROR,    &Device_Error},
+  {ADA$_END_ERROR,       &End_Error},
+  {ADA$_MODE_ERROR,      &Mode_Error},
+  {ADA$_NAME_ERROR,      &Name_Error},
+  {ADA$_STATUS_ERROR,    &Status_Error},
+  {ADA$_NOT_OPEN,        &Use_Error},
+  {ADA$_ALREADY_OPEN,    &Use_Error},
+  {ADA$_USE_ERROR,       &Use_Error},
+  {ADA$_UNSUPPORTED,     &Use_Error},
+  {ADA$_FAC_MODE_MISMAT, &Use_Error},
+  {ADA$_ORG_MISMATCH,    &Use_Error},
+  {ADA$_RFM_MISMATCH,    &Use_Error},
+  {ADA$_RAT_MISMATCH,    &Use_Error},
+  {ADA$_MRS_MISMATCH,    &Use_Error},
+  {ADA$_MRN_MISMATCH,    &Use_Error},
+  {ADA$_KEY_MISMATCH,    &Use_Error},
+  {ADA$_MAXLINEXC,       &constraint_error},
+  {ADA$_LINEXCMRS,       &constraint_error},
+  {0,                    0}
 };
 
 #if 0
    /* Already handled by a pragma Import_Exception
       in Aux_IO_Exceptions */
 };
 
 #if 0
    /* Already handled by a pragma Import_Exception
       in Aux_IO_Exceptions */
-  {&ADA$_LOCK_ERROR,      &Lock_Error},
-  {&ADA$_EXISTENCE_ERROR, &Existence_Error},
-  {&ADA$_KEY_ERROR,       &Key_Error},
+  {ADA$_LOCK_ERROR,      &Lock_Error},
+  {ADA$_EXISTENCE_ERROR, &Existence_Error},
+  {ADA$_KEY_ERROR,       &Key_Error},
 #endif
 
 #endif /* IN_RTS */
 #endif
 
 #endif /* IN_RTS */
@@ -1258,8 +1255,8 @@ static const struct cond_except dec_ada_cond_except_table [] = {
 /* Non-DEC Ada specific conditions.  We could probably also put
    SS$_HPARITH here and possibly SS$_ACCVIO, SS$_STKOVF.  */
 static const struct cond_except cond_except_table [] = {
 /* Non-DEC Ada specific conditions.  We could probably also put
    SS$_HPARITH here and possibly SS$_ACCVIO, SS$_STKOVF.  */
 static const struct cond_except cond_except_table [] = {
-  {&MTH$_FLOOVEMAT, &constraint_error},
-  {&SS$_INTDIV,     &constraint_error},
+  {MTH$_FLOOVEMAT, &constraint_error},
+  {SS$_INTDIV,     &constraint_error},
   {0,               0}
 };
 
   {0,               0}
 };
 
@@ -1297,7 +1294,7 @@ resignal_predicate (int code);
 
 static const int * const cond_resignal_table [] = {
   &C$_SIGKILL,
 
 static const int * const cond_resignal_table [] = {
   &C$_SIGKILL,
-  &CMA$_EXIT_THREAD,
+  (int *)CMA$_EXIT_THREAD,
   &SS$_DEBUG,
   &LIB$_KEYNOTFOU,
   &LIB$_ACTIMAGE,
   &SS$_DEBUG,
   &LIB$_KEYNOTFOU,
   &LIB$_ACTIMAGE,
@@ -1324,8 +1321,8 @@ __gnat_default_resignal_p (int code)
       return 1;
 
   for (i = 0, iexcept = 0;
       return 1;
 
   for (i = 0, iexcept = 0;
-       cond_resignal_table [i] &&
-       !(iexcept = LIB$MATCH_COND (&code, &cond_resignal_table [i]));
+       cond_resignal_table [i]
+         && !(iexcept = LIB$MATCH_COND (&code, &cond_resignal_table [i]));
        i++);
 
   return iexcept;
        i++);
 
   return iexcept;
@@ -1410,7 +1407,7 @@ __gnat_handle_vms_condition (int *sigargs, void *mechargs)
       msg = message;
 
       exception->Name_Length = 19;
       msg = message;
 
       exception->Name_Length = 19;
-      /* ??? The full name really should be get sys$getmsg returns.  */
+      /* ??? The full name really should be get SYS$GETMSG returns.  */
       exception->Full_Name = "IMPORTED_EXCEPTION";
       exception->Import_Code = base_code;
 
       exception->Full_Name = "IMPORTED_EXCEPTION";
       exception->Import_Code = base_code;