public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch] Simple change to include/longlong.h to quiet warnings.
@ 2014-04-30 23:30 Steve Ellcey 
  2014-05-01  0:10 ` Andrew Pinski
  2014-05-01  6:13 ` Richard Sandiford
  0 siblings, 2 replies; 3+ messages in thread
From: Steve Ellcey  @ 2014-04-30 23:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: rdsaniford


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.


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch] Simple change to include/longlong.h to quiet warnings.
  2014-04-30 23:30 [Patch] Simple change to include/longlong.h to quiet warnings Steve Ellcey 
@ 2014-05-01  0:10 ` Andrew Pinski
  2014-05-01  6:13 ` Richard Sandiford
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Pinski @ 2014-05-01  0:10 UTC (permalink / raw)
  To: Steve Ellcey; +Cc: GCC Patches, rdsaniford

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch] Simple change to include/longlong.h to quiet warnings.
  2014-04-30 23:30 [Patch] Simple change to include/longlong.h to quiet warnings Steve Ellcey 
  2014-05-01  0:10 ` Andrew Pinski
@ 2014-05-01  6:13 ` Richard Sandiford
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Sandiford @ 2014-05-01  6:13 UTC (permalink / raw)
  To: Steve Ellcey ; +Cc: gcc-patches, rdsaniford

"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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-01  6:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-30 23:30 [Patch] Simple change to include/longlong.h to quiet warnings Steve Ellcey 
2014-05-01  0:10 ` Andrew Pinski
2014-05-01  6:13 ` Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).