From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,5492ecb095683154 X-Google-Attributes: gid1164f8,public X-Google-Thread: 1014db,5492ecb095683154 X-Google-Attributes: gid1014db,public X-Google-ArrivalTime: 1992-03-12 02:22:47 PST Xref: sparky comp.lang.c:6186 comp.sys.dec:1981 Path: sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!ira.uka.de!chx400!dxcern!sunsci!Roberto From: Roberto@sunsci.cern.ch (Roberto Divia) Newsgroups: comp.lang.c,comp.sys.dec Subject: Re: Is #define A(...) (stmt1, stmt2,. ..) valid? Message-ID: <1992Mar12.093301.27695@dxcern.cern.ch> Date: 12 Mar 92 09:33:01 GMT Article-I.D.: dxcern.1992Mar12.093301.27695 References: <3730@hp832.hubinf.UUCP> <630@wookie.dbaccess.com> <1992Mar11.051239.15580@jrd.dec.com> Sender: Roberto@sunsci (Roberto Divia) Organization: CERN In article <1992Mar11.051239.15580@jrd.dec.com>, diamond@jit345.bad.jit.dec.com (Norman Diamond) writes: > In article <630@wookie.dbaccess.com> steve@dbaccess.com (Steve Suttles) writes: > >And for the record, the implementation on VAX C is definitely broken. > I disagree. My copy of K&R-1 doesn't have "assert" in the index. Well, on my VAX C Run-Tim Library Reference Manual (AI-JP84A-TE, March 1987) for VAX C Version 2.3, in section D-3 is written: [...] assert Macro #include assert void assert (int expression) [...] If then you look at the way assert() is defined: # define assert(expr) \ if (expr) ; \ else { _assert ("expr", __FILE__, __LINE__); abort(); } it's clear this is NOT a void expression. This is a statement. -- | Roberto Divia` | Love at first sight is one of the greatest | | ============= | labor-saving devices the world has ever seen | | CERN : European Laboratory for Particle Physics, 1211 Geneva 23 | | Switzerland (CH) |