This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fortran,patch] Use new stdint.h-related macros in ISO_C_BINDING
On Sun, 17 May 2009, Steve Kargl wrote:
> The patch breaks FreeBSD.
>
> In file included from ../../gcc4x/gcc/fortran/trans-types.c:335:
> ../../gcc4x/gcc/fortran/iso-c-binding.def: In function 'init_c_interop_kinds':
> ../../gcc4x/gcc/fortran/iso-c-binding.def:58: error: 'INTPTR_TYPE' undeclared (first use in this function)
The default definitions of all thest target macros (and I include
INTMAX_TYPE in the set, although it appears Fortran is using its own logic
for that type instead for some reason) are in c-common.c. You need to
move them elsewhere (e.g. defaults.h) to use them in Fortran. The
defaults expand to null pointers, which should be interpreted as the types
not being available.
--
Joseph S. Myers
joseph@codesourcery.com