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']