Re: [gnet-dev] Build with Sun compiler



On Mon, Apr 28, 2003 at 05:34:41PM +0100, martyn 2 russell bt com wrote:
> > Most changes are related to the fact that a (condition ? exp : exp)
> > expression is not an lvalue in C and hence can not be used in the left
> > hand side of an assignment. GCC seems to allow this but it is not
> > standard C.
> 
> Actually it is Standard C, see Conditional Expressions (2.11) Ansi C,
> Kernighan & Ritchie.

The conditional operator is ofcourse standard C. But it is not an
lvalue and can therefore not be used as the left hand part of an
assignment.

Check out this comp.lang.c FAQ entry:

  http://www.eskimo.com/~scs/C-faq/q3.16.html

Cheers,
-Ives
______________________________________________________________________
Ives Aerts                      Sony Visual Products Europe - Brussels
Ives Aerts sonycom com                    http://www.vpe-b.sonycom.com
`Apparantly, 1 in 5 people are Chinese. There are 5 people in my
 family, so it must be one of them.'                    (Tommy Cooper)



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