string_intrinsics_inc.c (string_len_trim): Use __INTPTR_TYPE__ to cast from pointer...
authorKai Tietz <kai.tietz@onevision.com>
Fri, 14 Aug 2009 19:30:13 +0000 (19:30 +0000)
committerKai Tietz <ktietz@gcc.gnu.org>
Fri, 14 Aug 2009 19:30:13 +0000 (21:30 +0200)
2009-08-15  Kai Tietz  <kai.tietz@onevision.com>

        * intrinsics/string_intrinsics_inc.c (string_len_trim): Use
        __INTPTR_TYPE__ to cast from pointer to scalar integer, if
        __INTPTR_TYPE is defined.

From-SVN: r150774

libgfortran/ChangeLog
libgfortran/intrinsics/string_intrinsics_inc.c

index 979e789..f441049 100644 (file)
@@ -1,3 +1,9 @@
+2009-08-15  Kai Tietz  <kai.tietz@onevision.com>
+
+       * intrinsics/string_intrinsics_inc.c (string_len_trim): Use
+       __INTPTR_TYPE__ to cast from pointer to scalar integer, if
+       __INTPTR_TYPE is defined.
+
 2009-08-14  Janne Blomqvist  <jb@gcc.gnu.org>
 
        * fmain.c: Add comment saying file is deprecated.
index f9fb1a2..64f5cd7 100644 (file)
@@ -196,7 +196,11 @@ string_len_trim (gfc_charlen_type len, const CHARTYPE *s)
       /* Handle the first characters until we're aligned on a long word
         boundary.  Actually, s + i + 1 must be properly aligned, because
         s + i will be the last byte of a long word read.  */
-      starting = ((unsigned long) (s + i + 1)) % long_len;
+      starting = ((unsigned long)
+#ifdef __INTPTR_TYPE__
+                 (__INTPTR_TYPE__)
+#endif
+                 (s + i + 1)) % long_len;
       i -= starting;
       for (; starting > 0; --starting)
        if (s[i + starting] != ' ')