[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules
From: |
malc |
Subject: |
Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules |
Date: |
Wed, 18 Aug 2010 00:33:05 +0400 (MSD) |
User-agent: |
Alpine 2.00 (LNX 1167 2008-08-23) |
On Tue, 17 Aug 2010, Jes Sorensen wrote:
> On 08/17/10 21:24, malc wrote:
> > On Tue, 17 Aug 2010, Jes Sorensen wrote:
> >
> >> On 08/17/10 20:55, malc wrote:
> >>> On Tue, 17 Aug 2010, Blue Swirl wrote:
> >>>>> The other thing that might be worth mentioning in the int/long section
> >>>>> is that long is complicated in broken development environments such as
> >>>>> Windows where it is only 32 bit :(
> >>>
> >>> There's absolutely nothing broken about LLP64 it's as valid as any other
> >>> ABI. (That's to Jes)
> >>
> >> Well it works if you program for it, but it still doesn't make it any
> >> good when you can't keep a pointer in a long to apply arithmetic to it.
> >> Anyway point with the documentation is to make it clear that we rely on
> >> being able to do long foo = (long)ptr;
> >
> > Which isn't (and never was) sanctioned by any standard, IOW not good.
>
> Well maybe this is where the problem is. Not being able to do this means
> that we need a special integer type to cover this case if we wanted to
> work on win64. Switching to long long would generate bad code on 32 bit
> archs so thats not an option.
That's why [u]intptr_t was invented.
>
> Depending on your viewpoint it is either it not being a standard that is
> bad, or the LLP64 that is bad.
This doesn't really parse for me.
>
> Anyway this is personal preference.
>
> Jes
>
--
mailto:address@hidden
- [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Blue Swirl, 2010/08/12
- [Qemu-devel] Re: [PATCH 2/5] CODING_STYLE: add C type rules, Blue Swirl, 2010/08/13
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Jes Sorensen, 2010/08/17
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Blue Swirl, 2010/08/17
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, malc, 2010/08/17
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Jes Sorensen, 2010/08/17
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, malc, 2010/08/17
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Jes Sorensen, 2010/08/17
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Anthony Liguori, 2010/08/17
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules,
malc <=
Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Richard Henderson, 2010/08/17
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Jes Sorensen, 2010/08/17
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Avi Kivity, 2010/08/18
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Jes Sorensen, 2010/08/19
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Avi Kivity, 2010/08/19
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Jes Sorensen, 2010/08/19
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Avi Kivity, 2010/08/19
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, malc, 2010/08/19
- Re: [Qemu-devel] [PATCH 2/5] CODING_STYLE: add C type rules, Avi Kivity, 2010/08/19
[Qemu-devel] Re: [PATCH 2/5] CODING_STYLE: add C type rules, Paolo Bonzini, 2010/08/18