* Re: Is #define A(...) (stmt1, stmt2,. ..) valid?
[not found] ` <630@wookie.dbaccess.com>
@ 1992-03-11 5:12 ` Norman Diamond
1992-03-12 9:33 ` Roberto Divia
0 siblings, 1 reply; 2+ messages in thread
From: Norman Diamond @ 1992-03-11 5:12 UTC (permalink / raw)
In article <630@wookie.dbaccess.com> steve@dbaccess.com (Steve Suttles) writes:
[in reply to the posting and one poor answer]:
>Both of you are correct, and both of you are incorrect.
You too, Mr. Suttles. You gave useful advice to programmers who port, or
prepare for portability, to non-ANSI implementations. But then:
>And as an added "feature", you can get better results on VMS by leaving
>out the checks. I guarantee you that if the pointer is zero, you will
>be notified (Access violation etc,etc,etc).
This is not generally true. The assert macro can test for a lot of
logic errors that the hardware and OS cannot test for. Even some invalid
operations on NULL pointers would not result in access violations, etc.
It's better to use assert.
>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.
VAX C has occasionally been known to violate K&R-1 in other ways, but
not in its definition of assert. Note that the topic of VAX C is not
appropriate for the comp.std.c newsgroup. [Personal opinion only.]
(Then came further useful advice about porting to one non-ANSI implementation.
The same advice would be useful in porting to ALL non-ANSI implementations.)
>Somebody from DEC, PLEASE ask me for specific complaints about the RTL; my
>list is far too big to post. And it is growing.
If you have a maintenance contract with Digital, I believe that the company's
opinion is that you should communicate with your Digital representative.
[Even this is my personal belief; I do not speak for the company.]
Even if you don't have a maintenance contract, you might ask your Digital
sales representative if there is an RTL available that might help your needs.
[There might be. I am not sure if there is or not.]
Aside from that, I have sometimes seen Digital employees reply to postings
in comp.unix.ultrix (not a lot of help to you) and sometimes comp.sys.dec.
It wouldn't hurt you to try posting in comp.sys.dec, though I can't promise
whether anything will happen.
I've directed followups to both comp.lang.c and comp.sys.dec since I'm not
sure which is more important to you. The topic has mostly drifted away from
standards issues.
--
Norman Diamond diamond@jit081.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.
"Yeah -- bad wiring. That was probably it. Very bad."
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Is #define A(...) (stmt1, stmt2,. ..) valid?
1992-03-11 5:12 ` Is #define A(...) (stmt1, stmt2,. ..) valid? Norman Diamond
@ 1992-03-12 9:33 ` Roberto Divia
0 siblings, 0 replies; 2+ messages in thread
From: Roberto Divia @ 1992-03-12 9:33 UTC (permalink / raw)
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) |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1992-03-12 9:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox