[Lxr-dev] [ lxr-Bugs-529854 ] False "stray ifdef" warning!
Brought to you by:
ajlittoz
From: <no...@so...> - 2002-03-17 16:11:00
|
Bugs item #529854, was opened at 2002-03-14 21:56 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=390117&aid=529854&group_id=27350 Category: genxref Group: None >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) >Summary: False "stray ifdef" warning! Initial Comment: Hi Lxr folks! I'm running genxref from the Debian unstable 0.3-2 version of lxr and I got some "stray ifdef" that does not look like bad ifdef's in the code. For example if I run genxref on this _C++_ program: #if 1 //* #endif /**/ Then the program thinks the #endif is in a C style comment and ignore it! The problem seems to disappera if I change the genxref code lines: # Remove comments. $contents =~ s/\/\*(.*?)\*\//&wash($1)/ges; $contents =~ s/\/\/[^\n]*//g; # C++ to # Remove comments. $contents =~ s/\/\/[^\n]*//g; # C++ $contents =~ s/\/\*(.*?)\*\//&wash($1)/ges; i.e. checks for C++ comments beore C comments. Best regards /Anders E Larsson ---------------------------------------------------------------------- >Comment By: Malcolm Box (mbox) Date: 2002-03-18 01:10 Message: Logged In: YES user_id=215386 Try using a more up-to-date version of lxr - 0.3 is very old now and no longer supported. More modern versions use ctags to parse the source and so don't fall prey to this problem. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=390117&aid=529854&group_id=27350 |