kdebug vs. non-debug builds
ossi at kde.org
Sun Dec 23 08:53:27 GMT 2007
On Sun, Dec 23, 2007 at 12:21:45AM -0500, Jaison Lee wrote:
> > > #if !defined(KDE_NO_DEBUG_OUTPUT)
> > > # define kDebug KDebug(QtDebugMsg, __FILE__, __LINE__, # Q_FUNC_INFO)
> > > #else
> > > # define kDebug if (1); else kDebug
> > > #endif
> > >
> I'm not certain of its brilliance, but I did notice that the offending
> definition is actually a redefinition of kDebug and kWarning from
> further up in the same file. Simply commenting out the faulty
> definitions has so far seemed successful.
uhm, no, not really. notice that the kDebug is in the else branch of an
always true condition, i.e., it will be completely eliminated by the
compiler after the syntax check. just removing the if works as such, but
generates quite some code just for the purpose of sending messages down
the drain ...
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
Confusion, chaos, panic - my work here is done.
More information about the kde-core-devel