This is the mail archive of the gcc-patches@gcc.gnu.org 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 (was: we are starting the wide int merge)


On Wed, May 28, 2014 at 11:48 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, May 28, 2014 at 11:38:55AM +0200, Richard Biener wrote:
>> On Wed, May 28, 2014 at 10:24 AM, FX <fxcoudert@gmail.com> wrote:
>> >> Yeah, a portable (C and C++) static assert would be nice.  And also pushing
>> >> this to gmp then.
>> >>
>> >> In the meantime I see nothing wrong in "merging" from GMP.
>> >
>> > One question, one comment:
>> >
>> > 1. can I count your âI see nothing wrongâ as an approval, as in âglobal reviewers can approve changes to any part of the compiler or associated librariesâ?
>>
>> Well, kind of.  But Jakub is as well, so I don't want to override him.  So
>> please wait for an ack from Jakub.  I agree with him that the casts
>> served a purpose and that, if removed, they need to be replaced with
>> an appropriate assertion measure.
>
> I think my preference would be to change include/ansidecl.h to:
>
>  /* This macro simplifies testing whether we are using gcc, and if it
>     is of a particular minimum version. (Both major & minor numbers are
>     significant.)  This macro will evaluate to 0 if we are not using
>     gcc at all.*/
>  #ifndef GCC_VERSION
> +/* Some compilers pretend to be GCC, even when they are not.  */
> +#if defined(__clang__) || defined(__INTEL_COMPILER)
> +#define GCC_VERSION 0
> +#else
>  #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
> +#endif
>  #endif /* GCC_VERSION */
>
> so that we really can trust the GCC_VERSION macro, casts in lhs of inline
> asm isn't the only incompatibility clang has.
>
> Any other compilers that define __GNUC__?

Every one I guess.  ICC 9 has it defined to 4, __GNUC_MINOR__ to 0.

Richard.

>         Jakub


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