A New Krazy Checker for #include
Matthias Kretz
kretz at kde.org
Sun Apr 8 21:11:36 BST 2007
On Sunday 08 April 2007 19:28, Allen Winter wrote:
> - in installed headers
> + use #include <foo.h> rather than "foo.h"
Why? If I install foo.h and bar.h into the same dir and foo.h includes bar.h
then foo.h should use "bar.h", no? If I understand correctly if foo.h would
include <bar.h> and there's another bar.h in the include directories
specified in the compiler switches you might end up with foo.h including the
wrong header. Please correct me if I'm wrong, but I think the test should be
the other way around. See attached testcase...
You can fix the testcase by changing the #include <foo.h> to an
#include "foo.h" in inc2/bar.h
--
________________________________________________________
Matthias Kretz (Germany) <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: includetest.tar.gz
Type: application/x-tgz
Size: 454 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070408/349e2ac4/attachment.bin>
More information about the kde-core-devel
mailing list