Hacker News new | ask | show | jobs
by summarybot 30 days ago
> If you would like to test your compiler (posting back the results in the comments is really appreciated, especially from strange/uncommon compilers and other languages which support pre- / post- increment ....

Uh, 85% of them show the wrong result so 85% of them clearly do not support pre and post increment.

1 comments

If the behavior is undefined, there is no wrong result.
Except that ++a means increment first and a++ means increment after. And that's well-documented and thoroughly understood. Implying that this is undefined behavior is a cop out and cope. Preposterous and juvenile. If not implemented , it should be. Case closed.