tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: config(5) break down



On Tue, Mar 16, 2010 at 06:22:14AM +0100, Wojciech A. Koszek wrote:

> You mean that you have a solution for:
> 
>       struct mystruct {
>       #ifdef DEBUG_MYSTRUCT
>               int      line;
>               char    *file;
>               char    *func;
>               void    *another_pointer;
>       #endif
>               ...
>       };
> 
> within a kernel code? That's the simpliest example, of course. There are
> areas where you simply can't prevent this kind of #ifdef's.

Yes: don't code like that. :-)

That's not to say it doesn't happen because there is a culture
of using #ifdef to deal with things that should be taken care of at  
runtime, and to "optimize" things that don't need optimizing. 
Old habits are hard to break.



Home | Main Index | Thread Index | Old Index