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 560105 - Error: More #endif's than #if's found
Error: More #endif's than #if's found
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: build
1.5.7.1
Other All
: Normal major
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2008-11-10 05:56 UTC by Ravi
Modified: 2011-08-14 14:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
File for testing (34 bytes, application/octet-stream)
2008-11-11 04:35 UTC, Ravi
Details
#import "include_gurded.h" (19 bytes, text/plain)
2009-02-05 08:50 UTC, idlysphere
Details
Doxyfile for bug example sent by JF (73.14 KB, text/plain)
2011-05-18 01:43 UTC, john.x.foster
Details

Description Ravi 2008-11-10 05:56:06 UTC
Please describe the problem:
While generating the documentation for a Obj-C header file, the documentation build script, displays message like "More #endif's than #if's found" for headers which have #ifndef includes.
Verified that the #ifndef and #endif are balanced out.(This is not a compilation error, occurs only when the code has compiled fine and documentation generation starts)

Steps to reproduce:
1. Try creating a documentation for a Obj-C header file with #ifndef statement


Actual results:
Error: More #endif's than #if's found is logged into to the documentation generation logs.

Expected results:
No Error logs.

Does this happen every time?
Yes

Other information:
Comment 1 Dimitri van Heesch 2008-11-10 19:36:11 UTC
This mimimal header works fine:
----------
#ifndef BLAH
#endif
----------
So please attach an example header that allows me to reproduce the problem.
Comment 2 Ravi 2008-11-11 04:35:42 UTC
Created attachment 122388 [details]
File for testing

With the attached file, am able to reproduce the Doxygen documentation build error.
Comment 3 Dimitri van Heesch 2008-11-11 20:29:11 UTC
I'm not (and I would expect a million mails about this by now if this trivial example would not have worked ;-) 

Are you using a custom input filter by any chance which removes the #endif?
Comment 4 Ravi 2008-11-11 21:50:23 UTC
No am not using any input filter.
Comment 5 Ravi 2008-11-11 21:52:25 UTC
I will update this bug, if I can find any more details my side. Thanks.
Comment 6 idlysphere 2009-02-05 08:50:13 UTC
Created attachment 127993 [details]
#import "include_gurded.h"

This problem can be reproduced by adding this file.
Comment 7 john.x.foster 2011-05-17 06:34:15 UTC
Here is an example file that fails. Note that adding a label to the @cond command fixes the problem.

/// @file

#if !defined NabSystem_h
#define NabSystem_h

/// @cond
#if defined _MSC_VER

#if !defined(SILLY_MS_STUFF)
#define SILLY_MS_STUFF
#endif

#else

#endif
/// @endcond 

#endif // NabSystem_h
Comment 8 Dimitri van Heesch 2011-05-17 18:06:57 UTC
Hi John,

Which version of doxygen did you test this with? 1.7.4 or older?
Comment 9 john.x.foster 2011-05-18 01:41:13 UTC
Using 1.7.4. It also happened with older versions. I'll attach the doxyfile.
Comment 10 john.x.foster 2011-05-18 01:43:18 UTC
Created attachment 188009 [details]
Doxyfile for bug example sent by JF
Comment 11 Dimitri van Heesch 2011-06-05 16:21:48 UTC
Thanks John. The problem you reported should be fixed in the next subversion update.
Comment 12 Dimitri van Heesch 2011-08-14 14:05:10 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.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.