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 676294 - LaTeX error documenting class defined in macro
LaTeX error documenting class defined in macro
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.8.0-SVN
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2012-05-18 07:19 UTC by Philip Blakely
Modified: 2012-05-19 15:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Blakely 2012-05-18 07:19:14 UTC
In C++, a multi-line macro redefining a class causes a "Runaway argument" problem in a hyperlink in LaTeX.

With the minimal example given at the bottom of this report, the generated LaTeX documentation causes pdflatex to crash with:

Runaway argument?
{\}^^M\hyperlink {classA}{    A}();\(\backslash \)^^M  \};    \(\backslash \ETC
.
! File ended while scanning use of \hyperlink.

This is due to \hyperlink{classA}{\} being in the generated .tex file.

The example originally had A as a templated class, with the macro defining a specialisation, so although the example code isn't valid C++, the additions that would cause it to be valid do not make the Doxygen error go away.

Reducing the first definition of A to a forward declaration causes the error to go away, as does putting the macro all onto one line, or removing the constructor.

This did not result in an error in release version 1.8.0, but does in the latest SVN version: 1.8.0-20120429 (rev. 813).

Doxyfile:
EXTRACT_ALL = YES

DoxygenTest.C:
class A
{
};

#define M\
  class A\
  {	\
    A();\
  };	\
Comment 1 Dimitri van Heesch 2012-05-18 08:51:31 UTC
Confirmed. Should be fixed in the next subversion update.
Comment 2 Dimitri van Heesch 2012-05-19 12:26:46 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.1. 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.
Comment 3 Philip Blakely 2012-05-19 15:41:18 UTC
Confirmed fixed for my code for version 1.8.1.

Many thanks.