This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch,fortran] Revamp type enumerators


On 10/17/2010 07:11 AM, Daniel Franke wrote:
On Sunday 17 October 2010 16:03:14 Jerry DeLisle wrote:
-{
-  GFC_DTYPE_UNKNOWN = 0,
-  GFC_DTYPE_INTEGER,
-  /* TODO: recognize logical types.  */
-  GFC_DTYPE_LOGICAL,
-  GFC_DTYPE_REAL,
-  GFC_DTYPE_COMPLEX,
-  GFC_DTYPE_DERIVED,
-  GFC_DTYPE_CHARACTER
+{ BT_UNKNOWN = 0, BT_INTEGER, BT_LOGICAL, BT_CHARACTER, BT_REAL,
BT_COMPLEX,
+  BT_DERIVED, BT_CLASS, BT_PROCEDURE, BT_HOLLERITH, BT_VOID

   }
-dtype;
-
+bt;

Isn't changing the values of the enums an ABI change?

I was trying to avoid that, but probably got carried away. How about I commit the change to the fortran-exp branch so that it gets merged into 4.7 when we plan to break ABI anyway?

Wouldn't it be sufficient to re-order the BT_* to match the GFC_DTYPE_*? Only BT_CHARACTER is out of order, BT_CLASS and on only add more identfiers. So, shouldn't this definition work, as in not breaking anything?

+  { BT_UNKNOWN = 0, BT_INTEGER, BT_LOGICAL, BT_REAL, BT_COMPLEX,
+    BT_DERIVED, BT_CHARACTER, BT_CLASS, BT_PROCEDURE, BT_HOLLERITH, BT_VOID }


Possibly, but I would want to test. One way to test would be to copy the before patch libraries into the after patch build directory and run the testsuite. Regardless, this is a fairly intrusive patch even though mostly mechanical. Anyone else have any opinions?


Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]