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

List:       kde-commits
Subject:    Re: KDE/kdepimlibs/kioslave/imap4
From:       Allen Winter <winter () kde ! org>
Date:       2008-05-30 11:35:44
Message-ID: 200805300735.45256.winter () kde ! org
[Download RAW message or body]

On Friday 30 May 2008 06:42:59 David Faure wrote:
> On Friday 30 May 2008, Dirk Mueller wrote:
> > > > Is this something Krazy should check for?
> > >
> > > For constant int values, at least, yes.
> >
> > #define's might also cause issues in --enable-final build mode (which we
> > don't support anymore, afaik, so its not a big issue).
>
> We do support enable final - at least the cmake buildsystem does support
> it, and I fixed kdelibs for it recently.
>
> cmake -DKDE4_ENABLE_FINAL:BOOL=ON
>
> > I wouldn't deprecate #defines
> > completely, so I don't think a krazy check is appropriate here. The
> > reason for that is that static ints generate massively different code in
> > -O0 vs -O2 (in case you try to hunt a bug) and also degrade performance
> > for non-integral types (floats, double constants, long long ints and
> > similar).
>
> Really? a static double is worse than a #define which will basically
> copy/paste that double everywhere where the code uses that value? compilers
> are strange...

I have a checker written.  It works well enough, I think.
It looks for integers and real numbers.  Not strings yet.

We could do a few things:
1) make it an "extra" check. i.e. you'll need to specifically ask
Krazy to run it. (with the --extra command line option or adding
a directive to a .krazy file)
2) make it a "super-strict" check. ie. it will automatically run if you are
in strict mode (with the --strict=high command line option).
3) trash it
4) ??

The EBN runs in a lower strictness so #define issues wouldn't show there.

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

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