GNOME Bugzilla – Bug 560105
Error: More #endif's than #if's found
Last modified: 2011-08-14 14:05:10 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:
This mimimal header works fine: ---------- #ifndef BLAH #endif ---------- So please attach an example header that allows me to reproduce the problem.
Created attachment 122388 [details] File for testing With the attached file, am able to reproduce the Doxygen documentation build error.
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?
No am not using any input filter.
I will update this bug, if I can find any more details my side. Thanks.
Created attachment 127993 [details] #import "include_gurded.h" This problem can be reproduced by adding this file.
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
Hi John, Which version of doxygen did you test this with? 1.7.4 or older?
Using 1.7.4. It also happened with older versions. I'll attach the doxyfile.
Created attachment 188009 [details] Doxyfile for bug example sent by JF
Thanks John. The problem you reported should be fixed in the next subversion update.
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.