This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC build failed with your patch on 2001-01-09T11:35:00Z.

On Jan  9, 2001, David Edelsohn <> wrote:

> 	The rs6000 port supports both 32-bit and 64-bit computation based
> on a runtime flag.  Therefore, the MAX_LONG_TYPE_SIZE is 64 because it can
> attain that value with the appropriate runtime flag.  This is necessary
> for 64-bit support.

Geoff was talking about the powerpc-eabi port, that I suppose is a
32-bit-only port.

> 	I was unaware of your patch until this discussion arose.  I think
> that it is a very bad patch and I urge you to revert it.

You can't depend on HOST_WIDE_INT being 32-bits.  Build an alpha-x-ppc
cross-compiler and it'll fail, because alpha's long is 64-bits wide.
If the ppc port depends on HOST_WIDE_INT being 32-bits long, the ppc
port is broken.  Of course, we may introduce temporary work-arounds,
but, eventually, the port should be fixed so as to work under such

Besides, there's a number of tests that fail unless HOST_WIDE_INT is
at least as wide as size_t or ptrdiff_t (I don't recall for sure
which; maybe both).  This is what motivated me to write this patch,
and it's working fine on a number of other 32/64-bit targets.

> hwint.h should not be assuming what size HOST_WIDE_INT to use other
> than the maximum, natural host wide int.

And what is the correct definition maximum, natural host wide int?  If
a host supports 64-bits integral type, and the target needs one, and
having it will allow GCC to produce correct code while, if no such
64-bits integral type were available, it would crash, why shouldn't we
generate correct code?

The aim is to generate correct code as much as possible (preferably
the same code), regardless of what the host platform is.  If the ppc
port relies on having a 32-bit HOST_WIDE_INT, it won't work if hosted
on alpha.  To me, this means it's broken and must be fixed.  Instead
of urging me to revert the patch, please urge yourself to fix the port
by removing any assumptions on HOST_WIDE_INT not being wider than
32-bits.  Such assumptions are deemed to be wrong.

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]