Re: code between #if #endif seems not be parsed

"Eric M. Ludlam" <[email protected]>
Newsgroups gmane.emacs.cedet
Message-ID <[email protected]>
On 08/27/2014 12:34 PM, zijianyue wrote:
> HI:
> As the pics below show,the code between #if #endif not be parsed.Please
> help!
> My .emacs is in the attachment.
>

Hi,

I tried the code from your image:

#include <stdlib.h>
#define ON 0
#define ABC ON

#if ABC
int abc();
#endif

void main() {


}

#if ABC
int abc()
{
   return 0;
}
#endif


and I can flip the #define of ON to be 0 or 1, and it will parse or not 
parse the function at the end correctly.

In fact, there is an existing test in the CEDET repository 
(tests/cedet/semantic/tests/testsppcond.cpp) that has even more levels 
of indirection.

Semantic uses the `hideif' package for handling all the #if macros 
determining if they should have the contents parsed or not.  Since you 
are using Emacs 24.4, and I am using Emacs 24.3, there is perhaps a 
change in hideif that is causing this problem.

I'm assuming this is true because the emacs-bzr-linux build failed the 
test on Aug 26, but passed on Aug 24th.

Perhaps someone who is familiar with 24.4 changes can help out?

Eric


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.