emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal: immediate strings


From: Paul Eggert
Subject: Re: Proposal: immediate strings
Date: Wed, 06 Jun 2012 14:44:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 06/06/2012 08:14 AM, Eli Zaretskii wrote:
>> >    unsigned long x : BITS_PER_PTRDIFF_T - 1;
>> >    unsigned y : 1;
>> > }
>> > 
>> > works even if BITS_PER_PTRDIFF_T < BITS_PER_LONG.
> But only on LP64 hosts, right?

Yes, I suppose the bitfield type would be
unsigned long long on hosts where ptrdiff_t
is too wide for unsigned long; this is something
that be determined via something like
"#if ULONG_MAX < PTRDIFF_MAX".

Or perhaps it'd be simpler to say this:

   size_t x : BITS_PER_PTRDIFF_T - 1;
   unsigned y : 1;

if that's portable in practice.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]