[C-prog-lang-l] sequence points inquiry

Aryan Kumar aryanaman2000 at gmail.com
Mon Feb 20 16:04:09 CET 2023


Dear Professor,

I asked you about side effects in the lecture today, when you mentioned
that sequence points are points in the program, where no more side effects
shall take place. I did some research and came to the conclusion that side
effects are any observable changes in the state of a program -- for
instance, memory writes, IO activity, function calls, exceptions, etc.
Furthermore, we can make some guarantees about the program state at a
sequence point.

Please let me know if this understanding is flawed.
Besides that, I have another question about undefined and unspecified
behavior.
Is it true that undefined behavior results from program execution that is
not defined in the C specification -- like indexing outside bounds --
whereas unspecified behavior is when the program execution depends on the
compiler -- like adding integer function calls?

Thank you!

Sincerely,
Aryan
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the c-prog-lang-l mailing list