Problem with sider cedet on #ifdef

I am using emacs cedet. I got a lot of help from cedet.

but I found handling handling #ifdef errors in cedet. not sure if this is from the inside of cedet or my wrong configuration. I am quoting some code in Curl where this problem occurs.

#ifdef CURL_DO_LINEEND_CONV
  if((data->set.crlf) || (data->set.prefer_ascii)) {
#else
  if(data->set.crlf) {
#endif /* CURL_DO_LINEEND_CONV */
    endofline_native  = "\n";

There should be some wrong match with this code. Because I got errors using (eassist-list-methods) or other cedet semantic functions (go to definition).

I could easily assume that this could be from two curly braces in #ifdef .. #endif block. I cut them to like it.

#ifdef CURL_DO_LINEEND_CONV
  if((data->set.crlf) || (data->set.prefer_ascii)) 
#else
  if(data->set.crlf) 
#endif /* CURL_DO_LINEEND_CONV */
{
    endofline_native  = "\n";

after that, the semantic functions of cedet work well.

any idea about this? Is it a problem of parser sereza?

- , cedet, ?

+5
2

, , - , init emacs:

(setq semantic-c-obey-conditional-section-parsing-flag nil)
+1

, semantic-lex-c-preprocessor-symbol-file . , CEDET, willy nilly, , semantic-lex-c-preprocessor-symbol-file. , CURL_DO_LINEEND_CONV . :

(add-to-list 'semantic-lex-c-preprocessor-symbol-file
             "~/Software/deal.II/include/deal.II/base/config.h")

, .

0

All Articles