The GD Coding Typo Dictionary (TM)

Started by
37 comments, last by fastcall22 13 years ago

Add a little spice to your headers

#define FASLE (true)


Genius. +1 from me
Advertisement
I always giggle when I have to declare an INITCOMMONCONTROLSEX structure. I love common controls, but I don't really want to initialise sex with them.
I've been the entire last hour looking for this bug. To make it worst finding it didn't solve the problem cause it happened that I copy-pasted the if clause in several places that I also had to modify once I realized my stupidity.


if (this_shouldnt_be_called_all_the_time);
dont_do_this_all_the_time();

[size="2"]I like the Walrus best.

I've been the entire last hour looking for this bug. To make it worst finding it didn't solve the problem cause it happened that I copy-pasted the if clause in several places that I also had to modify once I realized my stupidity.


if (this_shouldnt_be_called_all_the_time);
dont_do_this_all_the_time();




Shouldn't the compiler pop a warning on something like this? Eg, "C7273 - Hey, silly - you didn't REALLY mean that semi, didya?"

'owl' said:

I've been the entire last hour looking for this bug. To make it worst finding it didn't solve the problem cause it happened that I copy-pasted the if clause in several places that I also had to modify once I realized my stupidity.


if (this_shouldnt_be_called_all_the_time);
dont_do_this_all_the_time();




Shouldn't the compiler pop a warning on something like this? Eg, "C7273 - Hey, silly - you didn't REALLY mean that semi, didya?"


Apparently not. At least not gcc with ansi compatible warnings enabled.
[size="2"]I like the Walrus best.

Apparently not. At least not gcc with ansi compatible warnings enabled.

The real WTF is that you are using -ansi in 2011. I hope you were using -pedantic -Wall as well?

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]


'owl' said:

Apparently not. At least not gcc with ansi compatible warnings enabled.

The real WTF is that you are using -ansi in 2011. I hope you were using -pedantic -Wall as well?


I'm not following what's the problem with ansi. I do quite well with it.
[size="2"]I like the Walrus best.

I'm not following what's the problem with ansi. I do quite well with it.

Given that it was superseded by C99, some 12 years ago., I fell it is a bit like beating a dead horse. Then again, big business managed to do that to COBOL for 20 years, so you are in good company :P

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]


'owl' said:

I'm not following what's the problem with ansi. I do quite well with it.

Given that it was superseded by C99, some 12 years ago., I fell it is a bit like beating a dead horse. Then again, big business managed to do that to COBOL for 20 years, so you are in good company :P


heh, you know what. You're right. I'm using just -Wall.biggrin.gif
[size="2"]I like the Walrus best.
This pearl catches me out every once in a while.

if(x = y)
{
.....
}

This topic is closed to new replies.

Advertisement