Path: utzoo!attcan!uunet!mcvax!ukc!etive!hwcs!zen!frank From: frank@zen.co.uk (Frank Wales) Newsgroups: comp.lang.c Subject: Re: `interesting' program Summary: Hmmm Message-ID: <1639@zen.co.uk> Date: 10 Jul 89 18:52:08 GMT References: <2833@solo8.cs.vu.nl> Reply-To: frank@zen.co.uk (Frank Wales) Organization: Zengrange Limited, Leeds, England Lines: 15 In article <2833@solo8.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: [program deleted] >I say: zork() is a constant of type struct foo, so you cannot take its >address and it isn't an lvalue. >SE says: zork() is the name of a struct foo, so you CAN take its address. IMHO, zork() is a constant too, and hence not an lvalue. Both the HP-PA cc (3.01) and its xdb agree, and although I would be the last person to advocate using a compiler to confirm the language definition, I trust this one more than most. Maybe SE is used to C on some lazy or old-fashioned machine (e.g., a Sun386i running 4.0.1 SunOS, which allows both this().that and (&these())->those, producing equivalent code). -- Frank Wales, Systems Manager, [frank@zen.co.uk<->mcvax!zen.co.uk!frank] Zengrange Ltd., Greenfield Rd., Leeds, ENGLAND, LS9 8DB. (+44) 532 489048 x217