After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 641346 - [PATCH] Conditional compilation not working properly
[PATCH] Conditional compilation not working properly
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.7.3
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-02-03 14:01 UTC by Harpreet
Modified: 2011-03-28 14:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
contains configuration file (config), source files (one.cxx and two.cxx), generated result dir (doc_gen) (64.12 KB, application/x-gzip)
2011-02-03 14:01 UTC, Harpreet
Details

Description Harpreet 2011-02-03 14:01:25 UTC
Created attachment 179989 [details]
contains configuration file (config), source files (one.cxx and two.cxx), generated result dir (doc_gen)

Hi,

Actually, I am trying to document lex/yacc files. For them I generate the cxx files and use them with doxygen. The problem is that since there are multiple lex files and each produce #define with same names. Which causes wrong behavior for the conditional compilation.

Have attached a tar ball containing two cxx files which have the same content. The pre-processing for both of them is different. 

I think the problem is that g_fileDefineDict is not cleared before each processing.

PATCH: (diff -uN)
======
--- doxygen-1.7.3/src/pre.l     2011-02-03 15:54:49.878117000 +0530
+++ tarballs/doxygen-1.7.3/src/pre.l    2010-12-04 03:48:44.000000000 +0530
@@ -2504,7 +2504,6 @@
   g_includeStack.clear();
   g_expandedDict->setAutoDelete(FALSE);
   g_expandedDict->clear();
-  g_fileDefineDict->clear();
   g_condStack.clear();
   g_condStack.setAutoDelete(TRUE);


Regards,
Harpreet Singh
Comment 1 Dimitri van Heesch 2011-02-05 16:02:01 UTC
Hi Harpreet, I think your solution is indeed correct. I'll include it in the next subversion update.
Comment 2 Dimitri van Heesch 2011-03-28 14:19:29 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.4. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.