pp-macro.h: unsupported usage of appended list?
Milian Wolff
mail at milianw.de
Mon Mar 7 22:10:38 UTC 2011
Milian Wolff, 07.03.2011:
> Hey all,
>
> I was finally fed up enough with this warning:
>
> pp_macro::definition There were items left on destruction: 139
>
> that I decided to hunt it down. Turns out that pp-macro.h uses two appended
> lists which is apparently not properly supported...
>
> appendedlist.h:337 in END_APPENDED_LISTS:
> void freeAppendedLists() { predecessor ## FreeChain(); } \
>
> that is only called for the formals, not for the definitions in pp-macro.
>
> What is the implication besides the nasty warning? This is a global static
> anyways hence more of a "still reachable" instead of a hard memory leak,
> or?
>
> Anyways, suggestions on improving this for 4.3? I doubt we can change the
> appendedlists.h macro in a binary compatible way?
btw: just adding definitionFreeChain(); to the pp-macro dtor triggers
ASSERT: "temporaryHashpp_macrodefinition().getItem(definitionData).isEmpty()"
in file /home/milian/projects/kde4/kdevelop/languages/cpp/parser/rpp/pp-
macro.h, line 165
probably because other functions from END_APPENDED_LISTS are not correct in
pp-macro, e.g. copyListsFrom and similar...
bye
PS: can one use variadic macros somehow to add support for arbitrary number of
containers in END_APPENDED_LISTS? I've not yet seen how, but considering what
is possible (think Boost Preprocessor) I wouldn't suprised if someone gets
that to work somehow...
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110307/daaa3063/attachment-0001.sig>
More information about the KDevelop-devel
mailing list