RE: Could you please explain this code segment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi W.H.Kalpa Pathum,

> Could you please explain how the output differs...?

The output differs because the increment operators are being used in such as way as to be undefined behavior.

> ...the way the compiler executes each segment of the variable?

Each compiler can execute each segment of the variable differently.  And may vary from version of the compiler to another version of the compiler.  And also may vary with the same compiler using different optimization levels.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux