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]

[gfortran] PR 15235 Remove definition of TRUE/FALSE from associated.c



This is another fix needed to build on Tru64. In associated.c we used to define an enum for logical values. Unfortunately, TRUE and FALSE are used by some, e.g. Tru64. This simply removes the enum, in accordance with the other parts of gfortran that also use plain 0 and 1 as meaning false and true.


Compiled and tested.

The remaining build problem has to do with our definition of cabsf not being consistent with the system's. It and PR 15266 are free to pick, I don't think I know enough about gcc's build machinery to attack those.

- Tobi

2005-05-18 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>

	PR fortran/15234
	* intrinsics/associated.c: Remove enum.
	(associated): Replace TRUE/FALSE by 1/0.

Index: associated.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/associated.c,v
retrieving revision 1.2
diff -u -p -r1.2 associated.c
--- associated.c        13 May 2004 06:41:02 -0000      1.2
+++ associated.c        18 May 2004 16:07:24 -0000
@@ -23,8 +23,6 @@ Boston, MA 02111-1307, USA.  */

#define associated prefix(associated)

-enum { FALSE = 0, TRUE = 1 };
-

 GFC_LOGICAL_4
 associated (const gfc_array_void *pointer, const gfc_array_void *target)
@@ -32,19 +30,19 @@ associated (const gfc_array_void *pointe
   int n, rank;

   if (GFC_DESCRIPTOR_DATA (pointer) != GFC_DESCRIPTOR_DATA (target))
-    return FALSE;
+    return 0;
   if (GFC_DESCRIPTOR_DTYPE (pointer) != GFC_DESCRIPTOR_DTYPE (target))
-    return FALSE;
+    return 0;

   rank = GFC_DESCRIPTOR_RANK (pointer);
   for (n = 0; n < rank; n++)
     {
       if (pointer->dim[n].stride != target->dim[n].stride)
-        return FALSE;
+        return 0;
       if ((pointer->dim[n].ubound - pointer->dim[n].lbound)
           != (target->dim[n].ubound - target->dim[n].lbound))
-        return FALSE;
+        return 0;
     }

-  return  TRUE;
+  return 1;
 }



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