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]

[Patch, Fortran] Replace intmax_type_node by INTMAX_TYPE


Hello all,

since gfortran now uses default.h to access the stdint.h
macros, it makes sense to replace our own definition
of intmax_type_node by INTMAX_TYPE. This was suggested
by Michael and Joseph, cf.
http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01245.html
http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01095.html

The attached patch was send me by FX. Build and regtested
on x86-84-linux. OK for the trunk?

Tobias
2009-05-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
	    Tobias Burnus  <burnus@net-b.de>

	* iso-c-binding.def: Use INTMAX_TYPE instead of intmax_type_node.
	* trans-types.c (init_c_interop_kinds): Remove intmax_type_node.

Index: gcc/fortran/iso-c-binding.def
===================================================================
--- gcc/fortran/iso-c-binding.def	(Revision 147987)
+++ gcc/fortran/iso-c-binding.def	(Arbeitskopie)
@@ -54,7 +54,7 @@ NAMED_INTCST (ISOCBINDING_LONG_LONG, "c_
               get_int_kind_from_node (long_long_integer_type_node), GFC_STD_F2003)
 
 NAMED_INTCST (ISOCBINDING_INTMAX_T, "c_intmax_t", \
-              get_int_kind_from_node (intmax_type_node), GFC_STD_F2003)
+              get_int_kind_from_name (INTMAX_TYPE), GFC_STD_F2003)
 NAMED_INTCST (ISOCBINDING_INTPTR_T, "c_intptr_t", \
               get_int_kind_from_name (INTPTR_TYPE), GFC_STD_F2003)
 NAMED_INTCST (ISOCBINDING_SIZE_T, "c_size_t", \
Index: gcc/fortran/trans-types.c
===================================================================
--- gcc/fortran/trans-types.c	(Revision 147987)
+++ gcc/fortran/trans-types.c	(Arbeitskopie)
@@ -285,11 +285,6 @@ static
 void init_c_interop_kinds (void)
 {
   int i;
-  tree intmax_type_node = INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE ?
-			  integer_type_node :
-			  (LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE ?
-			   long_integer_type_node :
-			   long_long_integer_type_node);
 
   /* init all pointers in the list to NULL */
   for (i = 0; i < ISOCBINDING_NUMBER; i++)

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