UnixLib select and speed

Stefan Bellon sbellon at sbellon.de
Sun Dec 5 03:06:49 PST 2004


Nick Burrett wrote:
> John Tytgat wrote:
> > In message <4d181d06e9sbellon at sbellon.de>
> >           Stefan Bellon <sbellon at sbellon.de> wrote:
> > 
> >>John Tytgat wrote:
> >>>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?
> > 
> > GNUish I think.

> It's been in the C language as far back as K&R C Programming Language 
> Vol 1, which is pre-C89.

I think you misunderstand. We've been talking about the shortcut ?:
syntax in

    int bits = (nfds % WORD_BITS) ?: WORD_BITS;

Not the above quoted semantic equivalence.

-- 
Stefan Bellon



More information about the gcc mailing list