You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was discovered in #816 when resolving all warning produced by sphinx-build. So, the test project (see link below) is taken from the original breathe docs, namely examples/specific/array.h.
The C style array declared as an argument to a function is not recognized by Sphinx and is reported in the following warning:
full build log
(venv) PS path\to\C-array> sphinx-build docs docs/_build/html
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
Running directive: .. c:function:: int bar (int n, int a[static n])
path\to\C-array\docs\index.rst.rst:13: WARNING: Parsing of expression failed. Using fallback parser. Error was:
Error in postfix expression, expected primary expression or type.
If primary expression:
Invalid C++ declaration: Expected identifier in nested name, got keyword: static [error at 28]
int bar (int n, int a[static n])
----------------------------^
If type:
Invalid C++ declaration: Expected identifier in nested name, got keyword: static [error at 28]
int bar (int n, int a[static n])
----------------------------^
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 1 warning.
The HTML pages are in docs\_build\html.
Preliminary research suggests that breathe does in fact invoke the c:function directive (notice the C domain), but something else is happening here because the warning says Invalid C++ declaration:.
The text was updated successfully, but these errors were encountered:
and it worked fine with sphinx. So, now I'm thinking there's something weird with how the directive is invoked in breathe.
2bndy5
changed the title
Sphinx doesn't recognizes C array syntax
breathe doesn't pass c:function properly with a C array syntax in parameter declaration
Jun 30, 2022
This was discovered in #816 when resolving all warning produced by
sphinx-build
. So, the test project (see link below) is taken from the original breathe docs, namely examples/specific/array.h.The C style array declared as an argument to a function is not recognized by Sphinx and is reported in the following warning:
full build log
example project
C-array.zip
Preliminary research suggests that breathe does in fact invoke the
c:function
directive (notice the C domain), but something else is happening here because the warning saysInvalid C++ declaration:
.The text was updated successfully, but these errors were encountered: