Newsgroups: | comp.compilers |
From: | msb@sq.com (Mark Brader) |
Keywords: | C++, optimize |
Organization: | SoftQuad Inc., Toronto, Canada |
References: | 95-08-034 95-08-096 |
Date: | Fri, 18 Aug 1995 03:16:58 GMT |
Paul Eggert (eggert@twinsun.com) writes:
> For example, the C Standard, by my reading, does not define the
> behavior of `F()+F()' if F's definition is `int F() {return x++;}',
Only if you ignore or (in my opinion; Paul disagrees) misinterpret
the part where it says "Except as indicated, statements are executed
in sequence".
> ... it seems that most of the committee didn't want this example to
> have undefined behavior -- it's just that they didn't cover the issue
> carefully enough in the standard.
> Eventually they made a decision, but the point is that the original
> standard shouldn't have been so unclear.
Yep. In fact, I remember that either during the public review of the
C standard or in a private communication with the redactor, I suggested
that it should explain what it meant to call a function. The response
as to the effect that this is a general concept in programming languages
and everyone knows what it means, and I accepted that. But this matter
of disagreement showed that I was wrong to do so!
--
Mark Brader
msb@sq.com
SoftQuad Inc.
Toronto
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.