string_intrinsics_inc.c (string_len_trim): Use __INTPTR_TYPE__ to cast from pointer to scalar integer...

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
This commit is contained in:
Kai Tietz 2009-08-14 19:30:13 +00:00 committed by Kai Tietz
parent 387c39e1ec
commit 9d3458531a
2 changed files with 11 additions and 1 deletions

View 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.

View 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] != ' ')