8 Sep 2004 10:17
Bug in semantic-c.el with define-mode-local-override definitions
Berndl, Klaus <klaus.berndl <at> sdm.de>
2004-09-08 08:17:07 GMT
2004-09-08 08:17:07 GMT
Hi guys,
i think i have detected a serious bug in cedet beta3b...
It seems that the mode-local stuff has been completey redesigned between cedet2b and cedet3b - in
semantic-c.el now the macro define-mode-local-override is used, e.g. for semantic-tag-abstract-p.
Well, this is not abug but IMHO defining this for c-mode is a bug! Anyway in cedet2b this function works
whereas in cedetbeta3b it doesn't:
If point stays onto a virtual method in a c++-header-file then the following code fails in 3b (in 2b it works):
(semantic-tag-abstract-p (semantic-current-tag)
(semantic-current-tag-parent))
Should this overloads not being defined for c++-mode instead of c-mode - or even better for c-common-mode
if an override should be used for for all c-modes?! maybe the macro define-mode-local-override (and
subsequent stuff from mode-local.el) should be designed to get a list of modes instead exactly one mode?!
Thoughts?
Ciao,
Klaus
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
> But nevertheless something doesn't work:
>
> here is what is done by semantic-tag-abstract-p-c-mode:
>
> ((eq (semantic-tag-class tag) 'function)
> (semantic-tag-get-attribute tag :pure-virtual-flag))
>
> Ok, when i put point onto the virtual method "aProctedMethod"
> (line 8 in the following short c++-header-file klaus-test.hpp) then
> (semantic-tag-attributes (semantic-current-tag)) returns
>
> (:prototype-flag t :typemodifiers ("virtual") :type "void")
>
> You see, there is no attribute :pure-virtual-flag contained in
> the plist! So no one can be found and therefore in turn the
> abstract-p check fails...
I didn't received your klaus-test.hpp sample. Anyway it looks you're
probably right. The :pure-virtual-flag is provided by the c.by
grammar rule:
fun-or-proto-end
: SEMICOLON
David
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
RSS Feed