[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: kdebug vs. non-debug builds
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2007-12-23 8:53:27
Message-ID: 20071223085327.GA4595 () ugly ! local
[Download RAW message or body]

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.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic