A New Krazy Checker for #include

Thomas Zander zander at kde.org
Mon Apr 9 13:21:50 BST 2007


On Monday 09 April 2007 13:48, Andras Mantia wrote:
> On Sunday 08 April 2007, Allen Winter wrote:
> > Other ideas that I may implement one day (or maybe someone will do
> > me): - if including an installed header, always use #include <foo.h>,
> > not "foo.h" - foo.cpp should always include its own header foo.h
> > first

To avoid further confusion lets avoid bad quoting and split the above two 
issues up again;
> > - if including an installed header, always use #include <foo.h>,
> > not "foo.h"
and
> > - foo.cpp should always include its own header foo.h first


> This is wrong, you shouldn't do it. If a module has a library, you will
> have a wrong build if you don't install first the library from the
> module and then build the rest, otherwise an already installed old
> version will be picked up.

This problem is irrelevant of wheather you use <> or "" , no?
The problem you state is that the compiler was passed the installed 
headers dir before the source dir.

Note for Alan; if the first point is _only_ tested in header files, and 
then only on ones that actually will be installed then I think it looks 
good.
-- 
Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070409/091957ff/attachment.sig>


More information about the kde-core-devel mailing list