UnixLib select and speed
nospam at philipnet.com
Sun Dec 5 04:51:48 PST 2004
On 4 Dec, in message <4d181d06e9sbellon at sbellon.de>
Stefan Bellon <sbellon at sbellon.de> wrote:
>John Tytgat wrote:
>> In message <4d18083f23sbellon at sbellon.de>
>> Stefan Bellon <sbellon at sbellon.de> wrote:
>> > Peter, your latest commit to unix/select.c contains the following
>> > line twice:
>> > int bits = (nfds % WORD_BITS) ?: WORD_BITS;
>> > Is there some GNUish operator ?: or has something gone wrong?
>> > Neither I nor Norcroft C don't know this ?: thing.
>> Someone is never too old to learn ;-)
>> This is semantically the same as :
>> int bits = (nfds % WORD_BITS) ? (nfds % WORD_BITS) : WORD_BITS;
>That's what I suspected as it's the only way it makes sense. But is
>this C90 or C99, or just GNU?
§6.5.15 of C99(TC1) if you want to look it up.
http://philipnet.com | http://director.sf.net | http://sms2003.com/philipnet
More information about the gcc