[Daca-general] undertaker and DACA
Raphael Geissert
geissert at debian.org
Fri Jan 28 08:34:38 UTC 2011
Hi Christoph,
On Thursday 27 January 2011 15:38:14 Christoph Egger wrote:
> The undertaker can also be run without configuration model and will
> find logically dead code then in cases like
>
> #if A
> #if A
> // a
> #else
> // !a
> #endif
> #endif
Could be interesting to run it on the whole Debian archive then.
> There needs to be a transfoprmation program parsing the non-code
> model and generating the model files. This is currently only implemented
> for the new kconfig.
Do you know if there is any plan to add support for others? which ones?
> > [1] http://sourceforge.net/apps/trac/cppcheck/ticket/1467
>
> However there's no support for #define especially conditional
> #define like the one in this bug report.
That example is interesting because it represents two cases:
1) When checking a clean source code tree it means there is dead code because
!BAR can never be true.
2) However, that kind of code can be seen in the wild in './configure'd source
code. Since the configure script generates a default configuration via macro
definitions then it is possible there will be "dead" code.
Since the undertaker seems to operate based only on preprocessor directives,
it should probably fit in case 1), where it is expected to be run on a clean
source code tree. If that's so, adding support for #defines should probably be
a good idea.
Regards,
--
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net
More information about the Daca-general
mailing list