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 694147 - #undef is ignored by doxygen
#undef is ignored by doxygen
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.3.1-SVN
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2013-02-19 07:57 UTC by Aleksandr Platonov
Modified: 2013-08-23 15:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Aleksandr Platonov 2013-02-19 07:57:47 UTC
Example code:
#define a someting
#undef a
int a()
{
    return 0;
}

Doxyfile:
ENABLE_PREPROCESSING   = YES
MACRO_EXPANSION        = YES
EXPAND_ONLY_PREDEF     = NO
INPUT = test.c

Result:
Macros
#define 	a   someting
Functions
int 	someting ()

But should be:
Macros
#define 	a   someting
Functions
int 	a ()


This is regression (#undef works correctly in 1.7.3)
Comment 1 Dimitri van Heesch 2013-06-04 18:21:09 UTC
Thanks, I'll use your patch posted on doxygen-develop:

diff --git a/src/pre.l b/src/pre.l
index 4c017da..6f05d91 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -233,6 +233,7 @@ class DefineManager
    {
      Define *d = m_contextDefines.find(name);
      //printf("isDefined(%s)=%p\n",name,d);
+      if (d && d->undef) d=0;
      return d;
    }
    /** Returns a reference to the defines found in the current context. */
Comment 2 Dimitri van Heesch 2013-08-23 15:04:53 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.5. 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.