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]
Other format: [Raw text]

Re: Darwin bootstrap failure following wide int merge

On Wed, May 28, 2014 at 03:47:52PM +0200, Richard Biener wrote:
> On Wed, May 28, 2014 at 3:15 PM, FX <> wrote:
> >> After lengthy IRC discussions, what Richard and I can live with is
> >> && !defined(__clang__) in this particular case that uses longlong.h
> >> in GCC sources, with a comment why.
> >
> > Iâll test this patch and commit if there is no problem. But right now, current trunk doesnât build on x86_64-apple-darwin due to error below. Richard, could this be due to your revision 211013?
> Hum, yeah.  But why does it even warn if sizeof (long) == sizeof (long long)?

Because using the right format strings is important for portability.

> I suppose casting the result of CWI_ELT () to uint64_t fixes this.  Do
> similar errors happen elsewhere?
> (the hex printfs expect unsigned types but CWI_ELT returns a signed
> HWI)

I think the sign shouldn't be a problem, but perhaps there is a mismatch
between HOST_WIDE_INT definition and HOST_WIDE_INT_PRINT_HEX?

Defining HOST_WIDE_INT to long long or long based on whether long is 64-bit
or not, but using PRIx64 etc. unconditionally is just wrong, either
HOST_WIDE_INT should be uint64_t and then you should use PRI*64, or it is
not, and then you should keep using what has been used in the past,
different macros depending on how HOST_WIDE_INT is defined.


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