In current SVN with the following C++ source file
class a { int flags:8; };
class c { int d; };
tagmanager doesn't recognise c as a class or type or anything.
But it recognises c as a class if either a is a struct not a class or flags isn't a field (ie no :8). It seems to be the combination that upsets it.
I havn't been able to find where the problem is so far, can anyone provide any guidance.
Cheers Lex
PS Oh yes its perfectly good c++, compiles and all.
Found it, C like parsing failed to account for the fact that a colon (:) could be used to indicate parents of a class or struct and still be used to indicate a bitfield size.
Patch attached. I'm not sure I've got the tm formatting right so feel free to fix.
Cheers Lex
On 26 May 2010 19:34, Lex Trotman elextr@gmail.com wrote:
In current SVN with the following C++ source file
class a { int flags:8; };
class c { int d; };
tagmanager doesn't recognise c as a class or type or anything.
But it recognises c as a class if either a is a struct not a class or flags isn't a field (ie no :8). It seems to be the combination that upsets it.
I havn't been able to find where the problem is so far, can anyone provide any guidance.
Cheers Lex
PS Oh yes its perfectly good c++, compiles and all.
On Thu, 27 May 2010 13:52:57 +1000, Lex wrote:
Found it, C like parsing failed to account for the fact that a colon (:) could be used to indicate parents of a class or struct and still be used to indicate a bitfield size.
Wow, cool. Good catch!
Patch attached. I'm not sure I've got the tm formatting right so feel free to fix.
Thanks a lot. I added parenthesis around "isLanguage (Lang_cpp) && (st->declaration == DECL_CLASS || st->declaration == DECL_STRUCT)" to make gcc happy (it warned about missing parenthesis around && within ||). It still seems to work so I guess I did it the right way but I would be happy if anyone could prove my change :).
Regards, Enrico
2010/5/31 Enrico Tröger enrico.troeger@uvena.de:
On Thu, 27 May 2010 13:52:57 +1000, Lex wrote:
Found it, C like parsing failed to account for the fact that a colon (:) could be used to indicate parents of a class or struct and still be used to indicate a bitfield size.
Wow, cool. Good catch!
Patch attached. I'm not sure I've got the tm formatting right so feel free to fix.
Thanks a lot. I added parenthesis around "isLanguage (Lang_cpp) && (st->declaration == DECL_CLASS || st->declaration == DECL_STRUCT)" to make gcc happy (it warned about missing parenthesis around && within ||). It still seems to work so I guess I did it the right way but I would be happy if anyone could prove my change :).
Havn't had time to update my Geany but the commit looks like what I meant it to be, if I read the brackets right that is, looks like lisp code :)
Cheers Lex
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.asc
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel