Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Roberto@sunsci.cern.ch (Roberto Divia)
Subject: Re: Is #define A(...) (stmt1, stmt2,. ..) valid?
Date: 12 Mar 92 09:33:01 GMT	[thread overview]
Message-ID: <1992Mar12.093301.27695@dxcern.cern.ch> (raw)
In-Reply-To: 1992Mar11.051239.15580@jrd.dec.com

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)                                                    |


      reply	other threads:[~1992-03-12  9:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3730@hp832.hubinf.UUCP>
     [not found] ` <630@wookie.dbaccess.com>
1992-03-11  5:12   ` Is #define A(...) (stmt1, stmt2,. ..) valid? Norman Diamond
1992-03-12  9:33     ` Roberto Divia [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox