GNOME Bugzilla – Bug 624829
\endcond errors not limited to a single file
Last modified: 2010-10-12 18:52:19 UTC
Created attachment 166203 [details] small example to demonstrate the issue. Each \cond command normally needs a closing \endcond. In my opinion the end of a file should automatically close all conditional blocks in case someone forgot the \endcond. Or in other words the scope of a \cond+\endcond block shall not span outside a file. Currently such block seems to continue also over a file end, which is useless in my opinion because you cannot control the order doxygen parses the files. Here is some background: A colleague forgot the \endcond in two or three files. This caused some confusion: Documentation of some items in some other files was missing. It took me some time to find out that the missing \endcond commands were the reason. Those conditional were false, so doxygen ignored everything from the \cond on. But because \endcond was missing doxygen ignored also other things in other files which I do not want to be ignored. P.S. I know that doxygen warns if \endcond is missing. But it is easy to oversee such warning. P.P.S. Dimitri confirmes that there sould be a protection in convertCppComments in commentcnv.l. But I found out that it does not work all the time. The bug seems to depend on the order of input file handling. I will attached a small example to demonstrate the issue. Please watch for the order of input files: # This input line triggers the defect: INPUT = cond.c testdef.c # This INPUT line does not trigger the defect and # everything looks like it should: #INPUT = testdef.c cond.c
I overlooked that the preprocessor is run before the part that handles the \cond..\endcond. Indeed the preprocessor does not nicely cleanup in case of a missing \endcond. 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.2. 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.
I can confirm that the demonstration sample now works properly with Doxygen 1.7.2. Well done! After running the example with Doxygen 1.7.2 I can now see the the documenation of "#define TEST" from "testdef.c" appearing the the HTML output - This is what is expected. In 1.7.1 the documentation for this TEST macro was not generated, because the \cond without \endcond from "cond.c" was still active.
Good to hear!