[Qt-creator] preprocessor parsing and #include
Roberto Raggi
roberto.raggi at trolltech.com
Tue Jan 20 11:27:39 CET 2009
On Jan 20, 2009, at 11:19 AM, Marek Jasovsky wrote:
> Hi Roberto
>
> can you imagine the preprocessor engine in creator doing recursive
> includes while parsing, similar way as msvc compiler for example, so
> that all includes are really included in the target cpp file, so
> that full type checking is possible while parsing?
right.
>
>
> can you imagine some other way that would enable full type checking,
> that does not involve really including #include files, as it is now
> in creator?
without resolving #include(s) there is pretty much no way to create a
correct translation unit. Think about ugly macros defined in header
files. Like
// foo.h
#define UGLY(a) class a {};
// foo.cpp
UGLY(MyClass)
UGLY(OtherClass)
as you can see there is no way to parse correctly foo.cpp without
#including foo.h before.
ciao robe
More information about the Qt-creator-old
mailing list