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
{{ message }}
Repository navigation
The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword #83536
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2022-03-29.13:39:30.927>created_at=<Date2020-01-16.09:25:21.719>labels= ['easy', '3.9', '3.10', '3.11', 'expert-C-API', 'type-feature', 'invalid']
title='The Python library will not compile with a C++2020 compiler because the code uses the reserved \xe2\x80\x9cmodule\xe2\x80\x9d keyword'updated_at=<Date2022-03-30.14:14:56.748>user='https://github.com/aCuria'
I wrote the draft PR #76356 to test https://bugs.python.org/issue39355 and #75463. Problem: I don't get any compiler warning or error about the "module" C++20 keyword. I tested GCC 11.2.1 and clang 13.0.0 of Fedora 35.
Activity
aCuria commentedon Jan 16, 2020
serhiy-storchaka commentedon Jan 16, 2020
Names of arguments can be just removed from function declarations in header files.
vstinner commentedon Jan 16, 2020
Qt has a similar issue with "slots": bpo-1086854 and bpo-38007.
14 remaining items
vstinner commentedon Mar 29, 2022
I wrote the draft PR #76356 to test https://bugs.python.org/issue39355 and #75463. Problem: I don't get any compiler warning or error about the "module" C++20 keyword. I tested GCC 11.2.1 and clang 13.0.0 of Fedora 35.
vstinner commentedon Mar 29, 2022
The C++20 "module" keyword is "contextual keyword". It's only a keyword if the first line if a file contains "module".
It's not the case in any .h file of the Python C API, so Python doesn't need to be changed. I close the issue.
erlend-aasland commentedon Mar 29, 2022
Great! No changes needed. Thanks for investigating.
vstinner commentedon Mar 30, 2022
Follow-up issue: bpo-47165 "[C API] Test that the Python C API is compatible with C++".