'goto" gone from computer languages or is it!

Dave Dunfield dave04a at dunfield.com
Sat May 14 06:30:12 CDT 2005


>Sorry to belabor the point, but...
>
>This is the part that I can't find in my C documentation.  I get that there
>are multiple assignments before the sequence point, whose order is
>"unspecified".  But can't find anything that says the result should be
>"undefined", so I assume it should be one of the values (but which one would
>still be "unspecified").

If it were just a matter of assignments, I might agree with you, however in
this particular case, the code contains three read-modify-write operations on
the same Lvalue all of which occur within the context of side effects within
a single sequence interval. IIRC the behavior in this instance is undefined.


>Then again, I am working from the lexical guide, rather than the standards
>documents themselves.  (Can you cite chapter and verse?)

Sorry, I'm operating from memory - haven't got a clue where my copy is at the
moment (haven't had to make major changes to my compiler in quite a long time).
Here is a reference to a C faq page which cites an example exactly like the
code in this discussion, with references to K&R, ANSI and ISO documents:

   http://www.eskimo.com/~scs/C-faq/q3.2.html

Regards,
Dave
-- 
dave04a (at)    Dave Dunfield
dunfield (dot)  Firmware development services & tools: www.dunfield.com
com             Collector of vintage computing equipment:
                http://www.parse.com/~ddunfield/museum/index.html




More information about the cctalk mailing list