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: [Patch] Simple change to include/longlong.h to quiet warnings.


On Wed, Apr 30, 2014 at 4:22 PM, Steve Ellcey <sellcey@mips.com> wrote:
>
> I would like to make a small change to include/longlong.h for glibc but
> I undertand that the GCC version of this file is the master one and
> should be changed first, is that right?

GCC version is not the master either.  GMP has the master version of
longlong.h.  But it looks like it does not have the code below at all.

Thanks,
Andrew Pinski


>
> My change is to check __mips16 with "defined (__mips16)" instead of
> just "__mips16" so that we don't get a warning when compiling with
> -Wundef (like glibc is now doing).
>
> Ok to checkin?  I will submit it for checkin to the binutils and
> glibc groups as well once it is approved here.
>
> Steve Ellcey
> sellcey@mips.com
>
>
> 2014-04-30  Steve Ellcey  <sellcey@mips.com>
>
>         * include/longlong.h: Use 'defined()' to check __mips16.
>
>
> diff --git a/include/longlong.h b/include/longlong.h
> index 0770290..31f88cb 100644
> --- a/include/longlong.h
> +++ b/include/longlong.h
> @@ -848,7 +848,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
>  #define UMUL_TIME 10
>  #define UDIV_TIME 100
>
> -#if (__mips == 32 || __mips == 64) && ! __mips16
> +#if (__mips == 32 || __mips == 64) && ! defined (__mips16)
>  #define count_leading_zeros(COUNT,X)   ((COUNT) = __builtin_clz (X))
>  #define COUNT_LEADING_ZEROS_0 32
>  #endif


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