[Qt-creator] preprocessor parsing and #include
Marek Jasovsky
jasovsky.marek at gmail.com
Tue Jan 20 12:01:11 CET 2009
sorry for partial mail
.. so that most of framework files do not have to be checked / parsed why
checking code, that is changed often.
grazie
2009/1/20 Marek Jasovsky <jasovsky.marek at gmail.com>
> one thing more..
>
> could you imagine having preprocessed headers stored somewhere? so that
>
> 2009/1/20 Marek Jasovsky <jasovsky.marek at gmail.com>
>
> grazie
>>
>> could you give me some hints how this could be implemented? I can imagine
>> you would not like to have this in release code, and so far I have not found
>> a way how to do this without breaking client->sourceNeeded method. I spent
>> almost 3 hours debugging this stuff before Thorbjorn pointed me to the idea,
>> that you are not doing full type check on parsing.
>>
>> can you imagine having this as a option in project settings?
>>
>> actually... what was the purpose of this one? client->sourceNeeded() ?
>>
>> thanks
>>
>> 2009/1/20 Roberto Raggi <roberto.raggi at trolltech.com>
>>
>> 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
>>>
>>> _______________________________________________
>>> Qt-creator mailing list
>>> Qt-creator at trolltech.com
>>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090120/d1a62505/attachment.html
More information about the Qt-creator-old
mailing list