[Nobug] NoBug inconsistency or feature
benny.lyons at uniserv.com
benny.lyons at uniserv.com
Thu Aug 26 14:17:12 CEST 2010
Hi,
While playing around with NoBug, I came across something that caused me
a few heartaches until I got to the bottom of the matter.
I've got a makefile with 3 different targets corresponding to the 3
different
NoBug build-levels: alpha, beta and release. Each target has its own -D
flag, specifying either EBUG_ALPHA, ...
Now I had a #define somewhere in one of my source files: something like
#define EBUG_BETA
Building with targets release caused a compiler error...that's good, but
building target ALPHA, didn't do anything (I think building target BETA
caused
a warning)!
If you got the build level defined to two different levels, I think it
would be
better if the compiler came back with an error instead of the current
tolerant usage
where one of the debugging levels wins and the user is left with a
surprise as
to which debugging level results. The user can then go and figure out
which build
level is actually preferred.
I've locally fixed this in nobug.h with something like:
#ifdef EBUG_ALPHA
#ifdef EBUG_BETA
#error Some error message
#endif
#endif
Is this bad or is there some purpose to having tolerant behaviour?
Ta
Benny
More information about the Nobug
mailing list