Add a little spice to your headers#define FASLE (true)
Genius. +1 from me
Add a little spice to your headers#define FASLE (true)
if (this_shouldnt_be_called_all_the_time);
dont_do_this_all_the_time();
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();
'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.
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.
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