Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double Square Bracket – somewhere – stops Doxygen #8914

Closed
traud opened this issue Nov 26, 2021 · 5 comments
Closed

Double Square Bracket – somewhere – stops Doxygen #8914

traud opened this issue Nov 26, 2021 · 5 comments
Labels
bug C/C++ C++11 For features introduced in the 2011 spec of C++

Comments

@traud
Copy link

traud commented Nov 26, 2021

#include <stdio.h>

/*!
 * \brief Hello World!
 */
static void hello() {
	puts("[[");
}

/*!
 * \brief main
 * \retval 0 Always
 * \retval 0 Never
 */
int main(void) {
	hello();
	return 0;
}

should give “return value '0' of main has multiple documentation sections” when I use

EXTRACT_ALL   = YES
WARN_AS_ERROR = YES

as configuration. However, the above gives no error/warning at all.

Analysis:
The problem are the two opening square quotes. For example, if I write
a) puts("[[]]"); closing both quotes
b) puts("["); just a single open quote
c) puts("[\0x5b"); one as hexadezimal
d) puts("[\133"); one as octal
instead, all these four alternatives work and Doxygen gives the error/warning as expected. For me, looks like Doxygen simply quits parsing (or be more precise: ignores) the remainder of the document when somewhere in the document two consecutive opening square quotes are found. Even worse, the following two examples do not work as expected either:
2. puts("[[]");
3. puts("[[Hello]World]!");
Consequently, to close such an ‘exceptional’ section, I have to place two closing square brackets consecutively (or avoiding two consecutive opening square brackets).

Version:
1.9.1 on Ubuntu 21.10, re-tested with current binary release (1.9.2)

@albert-github albert-github added bug C++11 For features introduced in the 2011 spec of C++ C/C++ labels Nov 26, 2021
albert-github added a commit to albert-github/doxygen that referenced this issue Nov 26, 2021
Doxygen sees, even in comment, the consecutive double open square brackets as the start of a C++11 attribute.
Defining specific rule for C++ and starting square bracket in a string.
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #8915

@traud
Copy link
Author

traud commented Nov 27, 2021

I cannot comment on the proposed Pull Request (I do not understand the commit message), nevertheless, many thanks for taking over!

@albert-github
Copy link
Collaborator

Maybe you can build an master version with the proposed patch or use one of the "artifacts" from https://github.com/doxygen/doxygen/actions/runs/1508040340 otherwise you have to wait to till it is integrated into an official release.

doxygen added a commit that referenced this issue Nov 29, 2021
issue #8914 Double Square Bracket – somewhere – stop Doxygen
@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Nov 30, 2021
@albert-github
Copy link
Collaborator

Code has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

@doxygen
Copy link
Owner

doxygen commented Dec 31, 2021

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.3.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Dec 31, 2021
@doxygen doxygen closed this as completed Dec 31, 2021
@albert-github albert-github changed the title Double Square Bracket – somewhere – stop Doxygen Double Square Bracket – somewhere – stops Doxygen Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug C/C++ C++11 For features introduced in the 2011 spec of C++
Projects
None yet
Development

No branches or pull requests

3 participants