Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.lang.c Subject: Re: cond. op. on ='s LHS Message-ID: <10069@dog.ee.lbl.gov> Date: 20 Feb 91 04:44:49 GMT References: <11073@pasteur.Berkeley.EDU> <15184@smoke.brl.mil> <326@smds.UUCP> <1196@sheol.UUCP> <331@smds.UUCP> <1210@sheol.UUCP> <335@ptcburp.ptcbu.oz.au> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 22 X-Local-Date: Tue, 19 Feb 91 20:44:49 PST >throopw@sheol.UUCP (Wayne Throop) writes: [the result of unary `*' (indirect) is always an lvalue] In article <335@ptcburp.ptcbu.oz.au> michi@ptcburp.ptcbu.oz.au (Michael Henning) writes [abbreviated]: > int array[10][10]; > *array >The type of the expression after dereferencing is "array of 10 ints", which >is *not* an lvalue. Technically, the result *is* an lvalue (according to ANSI terminology, at least)---but it is not a `modifiable' lvalue. (The type of `array' above is `array 10 of array 10 of int'; in a value context, such as the target of unary `*', this changes to `pointer to array 10 of int'. The indirection changes this it `array 10 of int', which, in an expression context, devolves to `pointer to int'. Until the final devolving, however, the object produced by the indirection is a non-modifiable lvalue of type `array 10 of int'.) -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab EE div (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov