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

C, keyword changes #9356

Merged
merged 1 commit into from Jun 18, 2021
Merged

Conversation

jakobandersen
Copy link
Contributor

Feature or Bugfix

  • Feature
  • Bugfix

Purpose

Certain built-in types in C are spelled with a prefixed _, and then have a convenience macro to define a prettier name, e.g., _Bool has the macro bool. But those macros are only defined when you include the appropriate header, otherwise the name is a valid identifier. See also https://en.cppreference.com/w/c/keyword.
This PR removes the macro names from the C domain keyword list, but adds a user-defined list of extra keywords, where the macro names are listed as default.

Detail

  • Add c_extra_keywords as confval.
  • Move macro names from keywords to c_extra_keywords.
  • Add new keywords from C23 while we are at it.

Relates

Fixes #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
@jakobandersen jakobandersen added type:bug type:enhancement enhance or introduce a new feature domains:c labels Jun 17, 2021
@jakobandersen jakobandersen added this to the 4.0.3 milestone Jun 17, 2021
@jakobandersen jakobandersen self-assigned this Jun 17, 2021
@jakobandersen
Copy link
Contributor Author

@tk0miya, I don't think this PR needs to trigger a release of 4.0.3 by it self, unless a user requests it.

@jakobandersen jakobandersen merged commit df5764d into sphinx-doc:4.0.x Jun 18, 2021
@jakobandersen jakobandersen deleted the c_extra_keywords branch June 18, 2021 16:36
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
domains:c type:bug type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant