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
C domain: reconsider treating complex
as a C keyword.
#9354
Comments
That is indeed right, that keyword list was done a bit too quickly. |
CPython's happy at this point: Not sure I can comment on the usefulness or potential default contents of something like |
- Add new keywords from C23. - Add c_extra_keywords as confval. - Move macro names from keywords to c_extra_keywords. Fixes sphinx-doc#9354
- Add new keywords from C23. - Add c_extra_keywords as confval. - Move macro names from keywords to c_extra_keywords. Fixes sphinx-doc#9354
The |
According to issue 44426 reported on bugs.python.org, Sphinx 4.0.2 fails to build the current Python documentation (when warnings are being treated as errors) as a result of this warning:
This issue has been worked around in the CPython source, by changing the name
complex
tonum
. Nevertheless, I think Sphinx is being too strict here, and the error message is incorrect:complex
is not a C keyword. Ifcomplex.h
has been included, thencomplex
is a macro that expands to a C keyword, but that's not the same thing, and there's plenty of code out there that doesn't includecomplex.h
(CPython doesn't includecomplex.h
at any point, for example) and may still want to usecomplex
as a C variable name.Both gcc and clang are happy for
complex
to be used as a variable name, and don't issue any warning:The text was updated successfully, but these errors were encountered: