Commit 9d345853 by Kai Tietz Committed by Kai Tietz

string_intrinsics_inc.c (string_len_trim): Use __INTPTR_TYPE__ to cast from…

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
parent 387c39e1
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> 2009-08-14 Janne Blomqvist <jb@gcc.gnu.org>
* fmain.c: Add comment saying file is deprecated. * fmain.c: Add comment saying file is deprecated.
......
...@@ -196,7 +196,11 @@ string_len_trim (gfc_charlen_type len, const CHARTYPE *s) ...@@ -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 /* Handle the first characters until we're aligned on a long word
boundary. Actually, s + i + 1 must be properly aligned, because boundary. Actually, s + i + 1 must be properly aligned, because
s + i will be the last byte of a long word read. */ 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; i -= starting;
for (; starting > 0; --starting) for (; starting > 0; --starting)
if (s[i + starting] != ' ') if (s[i + starting] != ' ')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment