You thought C was easy?-The Little C Function from Hell... ;-)

Started by Bitbeisser, June 20, 2012, 04:50:29 PM

Previous topic - Next topic

Bitbeisser

Just ran into this little gem this morning.... ;D

http://blog.regehr.org/archives/482

Ralf

migf1

Quote from: Bitbeisser on June 20, 2012, 04:50:29 PM
Just ran into this little gem this morning.... ;D

http://blog.regehr.org/archives/482

Ralf

Nice one.

Pelles C 7.0rc4 x86 seems to always output the correct result, no matter what options I pass to its command line :)

Bitbeisser

Found another one going through my list of programming blogs this morning, a very typical example why people should absolutely get used to initializing variables properly rather than relying on C's "if it isn't explicitly defined, it's an int" philosophy...  :-\

http://markshroyer.com/2012/06/c-both-true-and-false/

Ralf

CommonTater

Quote from: Bitbeisser on June 28, 2012, 06:36:06 PM
Found another one going through my list of programming blogs this morning, a very typical example why people should absolutely get used to initializing variables properly rather than relying on C's "if it isn't explicitly defined, it's an int" philosophy...  :-\

http://markshroyer.com/2012/06/c-both-true-and-false/

Ralf

A rather nice introduction to the world of undefined behaviour...


Stefan Pendl

---
Stefan

Proud member of the UltraDefrag Development Team