home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!ftpbox!mothost!citi.prds.cdx.mot.com!dan
- From: dan@cae.prds.cdx.mot.com (Dan Breslau)
- Subject: Re: Question to test general C knowledge
- Message-ID: <1992Dec14.150401.1283@cae.prds.cdx.mot.com>
- Organization: none
- References: <19980@ksr.com> <PTmLVB4w165w@quest.UUCP> <1992Dec11.175620.20308@crd.ge.com> <1992Dec12.224541.29854@thunder.mcrcim.mcgill.edu> <1992Dec13.045828.1714@crd.ge.com>
- Date: Mon, 14 Dec 1992 15:04:01 GMT
- Lines: 19
-
- volpe@bart.NoSubdomain.NoDomain (Christopher R Volpe) writes:
-
- >You miss the point. One of them will happen first. Does the second
- >one constitute a modification? Look at it this way: When the "++" operator
- >is evaluated, the machine throws a card up in the air with the words
- >"put 3 in i" on it. That's the side effect associated with the "++" operator.
- >And since the value of the "++i" subexpression is "3", when the "="
- >operator is evaluated, the machine throws up another card in the air with
- >the words "put 3 in i" on it. The side effects are applied in the order
- >in which they fall. But since both side effects do the same thing, is
- >the object really being "modified" again when the second card falls?
-
- No, really, you're missing the point. The point is that you can't
- assume that the compiler will behave rationally just because common sense
- says it should. The compiler will behave rationally _only_ where the
- ANSI standard says it should (modulo bugs and/or non-compliance.)
-
- Dan Breslau
- dan@codex.com
-