➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients AliyevH, aCuria, erlendaasland, petr.viktorin, serhiy.storchaka, vstinner
Date 2022-03-29.13:01:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648558911.22.0.750477309762.issue39355@roundup.psfhosted.org>
In-reply-to
Content
STINNER Victor:
> What is the error message? How can the error be reproduced?

Keith (aCuria):
> Compile with a compiler supporting the C++20 core feature (Modules)
> https://en.cppreference.com/w/cpp/compiler_support

I built a C++ extension which calls PyModule_AddType(): I get no warning. I tested GCC and LLVM clang.

Commands:

clang -Wno-unused-result -g -Og -Wall -O0 -fPIC -I/home/vstinner/python/main/Include -I/home/vstinner/python/main -c Modules/_testcppext.cpp -o build/temp.linux-x86_64-3.11-pydebug/Modules/_testcppext.o -I/home/vstinner/python -Werror -Wall -Wextra -Wconversion -Wno-typedef-redefinition -std=c++20 -Wzero-as-null-pointer-constant -Wold-style-cast

gcc -Wno-unused-result -g -Og -Wall -O0 -fPIC -I/home/vstinner/python/main/Include -I/home/vstinner/python/main -c Modules/_testcppext.cpp -o build/temp.linux-x86_64-3.11-pydebug/Modules/_testcppext.o -I/home/vstinner/python -Werror -Wall -Wextra -Wconversion -Wno-typedef-redefinition -std=c++20 -Wzero-as-null-pointer-constant -Wold-style-cast

Reformatted commands:

['clang',
 '-Wno-unused-result',
 '-g',
 '-Og',
 '-Wall',
 '-O0',
 '-fPIC',
 '-I/home/vstinner/python/main/Include',
 '-I/home/vstinner/python/main',
 '-c', 'Modules/_testcppext.cpp',
 '-o', 'build/temp.linux-x86_64-3.11-pydebug/Modules/_testcppext.o',
 '-I/home/vstinner/python',
 '-Werror',
 '-Wall',
 '-Wextra',
 '-Wconversion',
 '-Wno-typedef-redefinition',
 '-std=c++20',
 '-Wzero-as-null-pointer-constant',
 '-Wold-style-cast']

['gcc',
 '-Wno-unused-result',
 '-g',
 '-Og',
 '-Wall',
 '-O0',
 '-fPIC',
 '-I/home/vstinner/python/main/Include',
 '-I/home/vstinner/python/main',
 '-c', 'Modules/_testcppext.cpp',
 '-o', 'build/temp.linux-x86_64-3.11-pydebug/Modules/_testcppext.o',
 '-I/home/vstinner/python',
 '-Werror',
 '-Wall',
 '-Wextra',
 '-Wconversion',
 '-Wno-typedef-redefinition',
 '-std=c++20',
 '-Wzero-as-null-pointer-constant',
 '-Wold-style-cast']
History
Date User Action Args
2022-03-29 13:01:51vstinnersetrecipients: + vstinner, petr.viktorin, serhiy.storchaka, erlendaasland, aCuria, AliyevH
2022-03-29 13:01:51vstinnersetmessageid: <1648558911.22.0.750477309762.issue39355@roundup.psfhosted.org>
2022-03-29 13:01:51vstinnerlinkissue39355 messages
2022-03-29 13:01:51vstinnercreate