diff mbox

Simple change to include/longlong.h to quiet warnings.

Message ID c33e1864-b67b-4e4c-8d70-ee18b0a63f75@BAMAIL02.ba.imgtec.org
State New
Headers show

Commit Message

Steve Ellcey April 30, 2014, 11:22 p.m. UTC
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?

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.

Comments

Andrew Pinski May 1, 2014, 12:10 a.m. UTC | #1
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
Richard Sandiford May 1, 2014, 6:13 a.m. UTC | #2
"Steve Ellcey " <sellcey@mips.com> writes:
> 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?

The copyright says:

  This file is part of the GNU C Library.

but maybe that isn't true?  Anyway, I committed a patch to longlong.h
only yesterday and no-one complained, so let's go with it.

Patch looks good to me, thanks.

Richard
diff mbox

Patch

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