Subject: Re: CVS commit: src/usr.bin/mail
To: None <source-changes@NetBSD.org>
From: Allen Briggs <briggs@netbsd.org>
List: source-changes
Date: 09/27/2006 12:48:21
On Wed, Sep 27, 2006 at 05:31:20PM +0200, Joerg Sonnenberger wrote:
> On Wed, Sep 27, 2006 at 03:23:34PM +0000, Christos Zoulas wrote:
> > Log Message:
> > Coverity CID 4194: Wow, isn't char *foo = bar() ? : "0"; a syntax error?!?!
> Wasn't that a GNUism?

At least in the early days.  I don't know if C89 or C99 codified it.

A ? : C; was if A is "true" (non-zero/non-NULL) then the result of
the expression is A, otherwise C.

I've not seen it used much at all, and would be happy if I never do,
but not tragically sad if I happen upon it again.  :-)

-allen

-- 
Allen Briggs  |  http://www.ninthwonder.com/~briggs/  |  briggs@ninthwonder.com