Re: preprocessor symbol map incorrect

RJD <[email protected]> Tue, 10 Feb 2015 12:26:41 +0000 (UTC)
Newsgroups gmane.emacs.semantic
Message-ID <[email protected]>
Eric Ludlam <eric <at> siege-engine.com> writes:

> There is a bug in hideif that broke #if parsing in semantic for some 
> versions of Emacs.  I think it is 24.4 and later?
> 
> You may just be out of luck for a little while, or you could use emacs 
> 24.3 which is what I have default w/ ubuntu, and which worked fine for 
> your example.
> 
> I also tried this in emacs 25, and none of the expressions worked.
> 
> Eric

Eric, thank you for your reply however I can confirm that for me this test
does not work on emacs version 24.3.1 Windows build using cedet version from
~~ 26th January.

This is the exact code:

=== CODE ===
#include <iostream>

#define WITH_TESTS
#define SW_VERSION 22

int main ( void ) {

#if ( SW_VERSION >= 22 )
   std::cout << "Version 22" << std::endl;
#endif /* ( SW_VERSION >= 22 ) */

#if defined ( WITH_TESTS )
   std::cout << "WITH_TESTS" << std::endl;
#endif /* define ( WITH_TESTS ) */

   return 0;
}

#if ( SW_VERSION >= 22 ) &&  ( defined( UNIT_TESTS ) )
void someFunc( void ) {
   return 1;
}
#endif /* ( SW_VERSION >= 22 ) */
=ENDCODE ===

When I take out the compound preprocessor check and make it:
===EX===
#if ( SW_VERSION >= 22 )
void someFunc( void ) {
   return 1;
}
=END EX===

Then run C-c , , - I can see with the help of global-decoration-mode that
the function has been picked up.

When I put the compound check in and run C-c , , the function does not get
picked up.

I guess I can check on Ubuntu later on.


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/