[quote name='Antheus' timestamp='1306070656' post='4814217']There is nothing wrong in that code.
The author knows it's valid. It's not wrong, except for the part where it didn't do what the author intended, meaning it caused a bug (
and in a memory allocator a bug is quite a wrong thing).
So, this thread is for any other things in C, C++ or any other languages that you think other people would find strange, amusing or unbelievable.
Did you all miss this part? ^^^
Too busy bikeshedding in Parkinson's committee? I heard you like bike sheds (any colour will do)...
[/quote]
Yes yes yes!
Guys, you are great
I do appreciate the objective analysis of the code, but yes, I know it is part of a memory management system. In fact is it my own memory management system that I was fixing, in part because of a bug (not the one I posted) that was in that very function call. And I'm not looking for a static code analyzer, although I do appreciate the offer. I also completely understand why that expression returns 4 on a 32-bit system. I'm also not suggesting that this and the other million similar kinds of bugs that people write into their code every day should be picked up by the compiler, and although I immediately wondered how it had gotten past the compiler, after a half second of looking at it, I understood why it had.
As Hodgman pointed out, after the initial "What the heck?" moment, I just found this funny and was looking to add a bit more humor to the forum. So, please, whatever you've got, I'd definitely like to see, in whatever language or form that you feel like sharing it in.
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper