This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch gfortran]: Fix warning for w64 reasoned by pointer cast
On 08/12/2009 12:07 PM, Kai Tietz wrote:
> Well, using intptr_t would be fine, but still not all target have
> stdint.h header. In this particular case even the type size_t could be
> used, but of course __INTPTR_TYPE__ would be more correct.
> This patch just fixes a warning. But even without this fix, the
> produced code doesn't have failures, the pointer is just truncated,
> but as the modulo is done, result remains the same.
>
> Ok, when I change to size_t, or __INTPTR_TYPE__?
>
I am in favour of __INTPTR_TYPE__ and I am in favour of fixing
warnings; however, as __INTPTR_TYPE__ is not available on all platforms
- some of which might be Fortran platforms -, I think we should use it
only with some conditional. As this fixes a warning and not an error,
adding nothing if __INTPTR_TYPE__ does not exist, would be fine with me.
Tobias