|
From: Uttam P. <ut...@us...> - 2006-01-20 01:08:58
|
> This behavior is intentional. Code like this: > if(verbose) > do_verbose_stuff(); > > will be syntax-checked/type-checked/etc. by the compiler. It won't be > an optimization problem, as the compiler will notice that the code is > dead and completely optimized out. Agree. > However, this code: > > #ifdef VERBOSE > do_verbose_stuff(); > #endif > > will not be syntax-checked/type-checked/etc. by the compiler unless > VERBOSE is true. This means verbose code will bitrot when changes > happen (variables go away, change names, etc.) as most people won't > remember or care about compiling with VERBOSE defined. > True. Thanks for the feedback. Uttam |