From: "H. Peter Anvin" <hpa@zytor.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Robert Richter <robert.richter@amd.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [patch 1/6] x86: apicdef unification: some constants made unsigned
Date: Mon, 12 Nov 2007 09:58:32 -0800 [thread overview]
Message-ID: <47389448.4050107@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.64N.0711121229360.30102@blysk.ds.pg.gda.pl>
Maciej W. Rozycki wrote:
> On Tue, 6 Nov 2007, Robert Richter wrote:
>
>> -#define GET_APIC_VERSION(x) ((x)&0xFF)
>> -#define GET_APIC_MAXLVT(x) (((x)>>16)&0xFF)
>> -#define APIC_INTEGRATED(x) ((x)&0xF0)
>> +#define GET_APIC_VERSION(x) ((x)&0xFFu)
>> +#define GET_APIC_MAXLVT(x) (((x)>>16)&0xFFu)
>> +#define APIC_INTEGRATED(x) ((x)&0xF0u)
>
> No point in doing this -- hexadecimal literals are unsigned by
> definition. File a compiler bug if you see them interpreted otherwise.
>
Not unless they have to be (see C99 if you don't believe me... on a
I32LP64 system for example, 0x7fffffff is signed int, 0x80000000 is
unsigned int, 0x100000000 is signed long).
What is this supposed to solve in the first place?
-hpa
next prev parent reply other threads:[~2007-11-12 18:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 18:36 [patch 0/6] x86: apicdef.h unification Robert Richter
2007-11-06 18:36 ` [patch 1/6] x86: apicdef unification: some constants made unsigned Robert Richter
2007-11-07 20:41 ` Jeremy Fitzhardinge
2007-11-08 10:14 ` Robert Richter
2007-11-12 12:31 ` Maciej W. Rozycki
2007-11-12 15:56 ` Robert Richter
2007-11-12 17:58 ` H. Peter Anvin [this message]
2007-11-06 18:36 ` [patch 2/6] x86: apicdef unification: minor changes in macro order Robert Richter
2007-11-06 18:36 ` [patch 3/6] x86: apicdef unification: whitespace changes only Robert Richter
2007-11-06 18:36 ` [patch 4/6] x86: apicdef unification: CONFIG_X86_32 checks added Robert Richter
2007-11-06 18:36 ` [patch 5/6] x86: apicdef unification: 32 and 64 bit files coalesced Robert Richter
2007-11-06 18:36 ` [patch 6/6] x86: apicdef unification: more whitespace changes Robert Richter
2007-11-06 20:32 ` [patch 0/6] x86: apicdef.h unification Thomas Gleixner
2007-11-08 10:24 ` Robert Richter
2007-11-08 17:53 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47389448.4050107@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=mingo@redhat.com \
--cc=robert.richter@amd.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.