GNOME Bugzilla – Bug 134216
Improper handling of '\"' in source
Last modified: 2013-03-31 03:34:23 UTC
Similar to bug 120708 , doxygen release 1.3.5 had trouble with my header file which contains " marks as char values. The bug also manifests itself with the string '"' (this won't compile though). The line that affects doxygen is const unsigned char DQUOT = '\"'; If this line is included, doxygen reports that all commands in single line comments after this point in the file are not valid in single line comments, even though they are. I can't release the code this occurs in, but will prepare a file that triggers this bug. Keep up the good work!
A workaround for this bug is detailed below: const unsigned char DQUOT = '\"'; ///" Doxygen continues to parse the file correctly in this case.
Created attachment 24349 [details] Demonstration of bug (should compile on most platforms)
It also occurs in function bodies: { char* t = '\"'; if (*s == '\"'); *t++ = '"'; // fix " } A single " in a comment before the next comment block will then fix the problem. Note that the help text generated after this is wrong, it is not just a spurious warning. A comment block like: /// Function 1. /// \note Note for function 1. /// \return self generates the following: Function 1. Note for function 1. self.
This is essentially the problem still present in #320975 (the parser cannot handle ordinary C syntax). Here's a more typical example, which I noticed because doxygen generated an error message: #if USE_OFFSETS Fprintf(fp, "#ifndef\tMember_Offset\n\ #define\tMember_Offset(T,M) ((int)(((long)&(((T*)0)->M))/\\\n\ \t\t\t\t ((long)&(((T*)0)->Q1) - (long)&(((T*)0)->s_MAX))))\n\ #endif\n"); #else Fprintf(fp, "#ifndef\tMember_Offset\n\ #define\tMember_Offset(T,M) ((vile_ ## M)-1)\n\ #endif\n"); #endif
oops, I modified the assignee of the wrong bug.
I have triaged this bug, and determined that the bug appears to be fixed in 1.8.3.1. If you still have problems with the latest version of doxygen, please reopen this bug and attach a sample in a tar or zip.