Skip to content

Bug: -Werror=nonnull when compiling with GCC on MINGW32 #1349

@dlech

Description

@dlech

Version

No response

Summary

In the WinRT Python bindings project, I tried building on MINGW32 using GCC 13 with -Werror -Wall -Wextra compiler options. This triggers -Werror=nonnull in winrt/base.h (see full error below).

Is this a GCC bug or something that can/should be fixed in cppwrint?

Reproducible example

See https://github.com/pywinrt/pywinrt/actions/runs/5987024544/job/16240788415

Can be reproduced by checking out commit referenced by that run and running the commands in the `test.yaml` file.

Expected behavior

GCC should compile without errors like MSVC and Clang.

Actual behavior

FAILED: CMakeFiles/_winrt_testcomponent.dir/winrt-TestComponent/py.TestComponent.cpp.obj
C:\msys64\mingw32\bin\c++.exe -D_WIN32_WINNT=_WIN32_WINNT_WIN10 -D_winrt_testcomponent_EXPORTS -IC:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt -IC:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/pywinrt -IC:/Users/david/Documents/GitHub/pywinrt/projection/winrt-TestComponent/cppwinrt -IC:/Users/david/Documents/GitHub/pywinrt/projection/winrt-TestComponent -isystem C:/msys64/mingw32/include/python3.11 -std=gnu++20 -Werror -Wall -Wextra -Wa,-mbig-obj -MD -MT CMakeFiles/_winrt_testcomponent.dir/winrt-TestComponent/py.TestComponent.cpp.obj -MF CMakeFiles\_winrt_testcomponent.dir\winrt-TestComponent\py.TestComponent.cpp.obj.d -o CMakeFiles/_winrt_testcomponent.dir/winrt-TestComponent/py.TestComponent.cpp.obj -c C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-TestComponent/py.TestComponent.cpp
In file included from C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/Windows.Foundation.h:6,
                 from C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/pywinrt/pybase.h:9,
                 from C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-TestComponent/py.TestComponent.cpp:3:
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::abi_GetRuntimeClassName(void**) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; I = {winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >}; int32_t = int]':
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7202:50:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetRuntimeClassName(void**) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; I = winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; Enable = void; int32_t = int]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7200:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7583:35: error: 'this' pointer is null [-Werror=nonnull]
 7583 |                 return this->outer()->GetRuntimeClassName(name);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1767:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetRuntimeClassName(void**)'
 1767 |             virtual int32_t __stdcall GetRuntimeClassName(void** name) noexcept = 0;
      |                                       ^~~~~~~~~~~~~~~~~~~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::abi_GetTrustLevel(winrt::Windows::Foundation::TrustLevel*) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; I = {winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >}; int32_t = int]':        
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7207:44:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetTrustLevel(winrt::Windows::Foundation::TrustLevel*) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; I = winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; Enable = void; int32_t = int]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7205:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7593:35: error: 'this' pointer is null [-Werror=nonnull]
 7593 |                 return this->outer()->GetTrustLevel(trustLevel);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1768:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetTrustLevel(winrt::Windows::Foundation::TrustLevel*)'
 1768 |             virtual int32_t __stdcall GetTrustLevel(Windows::Foundation::TrustLevel* level) noexcept = 0;
      |                                       ^~~~~~~~~~~~~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::abi_GetRuntimeClassName(void**) [with D = py::python_iterable<winrt::hstring>; I = {winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>}; int32_t = int]':
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7202:50:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetRuntimeClassName(void**) [with D = py::python_iterable<winrt::hstring>; I = winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>; Enable = void; int32_t = int]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7200:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7583:35: error: 'this' pointer is null [-Werror=nonnull]
 7583 |                 return this->outer()->GetRuntimeClassName(name);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1767:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetRuntimeClassName(void**)'
 1767 |             virtual int32_t __stdcall GetRuntimeClassName(void** name) noexcept = 0;
      |                                       ^~~~~~~~~~~~~~~~~~~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::abi_GetTrustLevel(winrt::Windows::Foundation::TrustLevel*) [with D = py::python_iterable<winrt::hstring>; I = {winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>}; int32_t = int]':
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7207:44:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetTrustLevel(winrt::Windows::Foundation::TrustLevel*) [with D = py::python_iterable<winrt::hstring>; I = winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>; Enable = void; int32_t = int]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7205:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7593:35: error: 'this' pointer is null [-Werror=nonnull]
 7593 |                 return this->outer()->GetTrustLevel(trustLevel);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1768:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetTrustLevel(winrt::Windows::Foundation::TrustLevel*)'
 1768 |             virtual int32_t __stdcall GetTrustLevel(Windows::Foundation::TrustLevel* level) noexcept = 0;
      |                                       ^~~~~~~~~~~~~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::GetIids(uint32_t*, winrt::guid**) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; I = {winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >}; int32_t = int; uint32_t = unsigned int]':        
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:8163:49:   required from 'winrt::impl::hresult_type winrt::implements<D, I>::GetIids(winrt::impl::count_type*, winrt::impl::guid_type**) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; I = {winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >}; winrt::impl::hresult_type = int; winrt::impl::count_type = unsigned int; winrt::impl::guid_type = winrt::guid]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7197:34:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetIids(uint32_t*, winrt::guid**) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; I = winrt::Windows::Foundation::Collections::IIterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; Enable = void; int32_t = int; uint32_t = unsigned int]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7195:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7573:35: error: 'this' pointer is null [-Werror=nonnull]
 7573 |                 return this->outer()->GetIids(count, array);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1766:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetIids(uint32_t*, winrt::guid**)'
 1766 |             virtual int32_t __stdcall GetIids(uint32_t* count, guid** ids) noexcept = 0;
      |                                       ^~~~~~~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::GetIids(uint32_t*, winrt::guid**) [with D = py::python_iterable<winrt::hstring>; I = {winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>}; int32_t = int; uint32_t = unsigned int]':
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:8163:49:   required from 'winrt::impl::hresult_type winrt::implements<D, I>::GetIids(winrt::impl::count_type*, winrt::impl::guid_type**) [with D = py::python_iterable<winrt::hstring>; I = {winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>}; winrt::impl::hresult_type = int; winrt::impl::count_type = unsigned int; winrt::impl::guid_type = winrt::guid]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7197:34:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetIids(uint32_t*, winrt::guid**) [with D = py::python_iterable<winrt::hstring>; I = winrt::Windows::Foundation::Collections::IIterable<winrt::hstring>; Enable = void; int32_t = int; uint32_t = unsigned int]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7195:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7573:35: error: 'this' pointer is null [-Werror=nonnull]
 7573 |                 return this->outer()->GetIids(count, array);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1766:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetIids(uint32_t*, winrt::guid**)'
 1766 |             virtual int32_t __stdcall GetIids(uint32_t* count, guid** ids) noexcept = 0;
      |                                       ^~~~~~~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::abi_GetRuntimeClassName(void**) [with D = py::python_iterable<winrt::hstring>::iterator; I = {winrt::Windows::Foundation::Collections::IIterator<winrt::hstring>}; int32_t = int]':
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7202:50:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetRuntimeClassName(void**) [with D = py::python_iterable<winrt::hstring>::iterator; I = winrt::Windows::Foundation::Collections::IIterator<winrt::hstring>; Enable = void; int32_t = int]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7200:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7583:35: error: 'this' pointer is null [-Werror=nonnull]
 7583 |                 return this->outer()->GetRuntimeClassName(name);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1767:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetRuntimeClassName(void**)'
 1767 |             virtual int32_t __stdcall GetRuntimeClassName(void** name) noexcept = 0;
      |                                       ^~~~~~~~~~~~~~~~~~~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::abi_GetTrustLevel(winrt::Windows::Foundation::TrustLevel*) [with D = py::python_iterable<winrt::hstring>::iterator; I = {winrt::Windows::Foundation::Collections::IIterator<winrt::hstring>}; int32_t = int]':
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7207:44:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetTrustLevel(winrt::Windows::Foundation::TrustLevel*) [with D = py::python_iterable<winrt::hstring>::iterator; I = winrt::Windows::Foundation::Collections::IIterator<winrt::hstring>; Enable = void; int32_t = int]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7205:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7593:35: error: 'this' pointer is null [-Werror=nonnull]
 7593 |                 return this->outer()->GetTrustLevel(trustLevel);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1768:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetTrustLevel(winrt::Windows::Foundation::TrustLevel*)'
 1768 |             virtual int32_t __stdcall GetTrustLevel(Windows::Foundation::TrustLevel* level) noexcept = 0;
      |                                       ^~~~~~~~~~~~~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::abi_GetRuntimeClassName(void**) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >::iterator; I = {winrt::Windows::Foundation::Collections::IIterator<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >}; int32_t = int]':
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7202:50:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetRuntimeClassName(void**) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >::iterator; I = winrt::Windows::Foundation::Collections::IIterator<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; Enable = void; int32_t = int]'        
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7200:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7583:35: error: 'this' pointer is null [-Werror=nonnull]
 7583 |                 return this->outer()->GetRuntimeClassName(name);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1767:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetRuntimeClassName(void**)'
 1767 |             virtual int32_t __stdcall GetRuntimeClassName(void** name) noexcept = 0;
      |                                       ^~~~~~~~~~~~~~~~~~~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::abi_GetTrustLevel(winrt::Windows::Foundation::TrustLevel*) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >::iterator; I = {winrt::Windows::Foundation::Collections::IIterator<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >}; int32_t = int]':
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7207:44:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetTrustLevel(winrt::Windows::Foundation::TrustLevel*) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >::iterator; I = winrt::Windows::Foundation::Collections::IIterator<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; Enable = void; int32_t = int]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7205:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7593:35: error: 'this' pointer is null [-Werror=nonnull]
 7593 |                 return this->outer()->GetTrustLevel(trustLevel);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1768:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetTrustLevel(winrt::Windows::Foundation::TrustLevel*)'
 1768 |             virtual int32_t __stdcall GetTrustLevel(Windows::Foundation::TrustLevel* level) noexcept = 0;
      |                                       ^~~~~~~~~~~~~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::GetIids(uint32_t*, winrt::guid**) [with D = py::python_iterable<winrt::hstring>::iterator; I = {winrt::Windows::Foundation::Collections::IIterator<winrt::hstring>}; int32_t = int; uint32_t = unsigned int]':
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:8163:49:   required from 'winrt::impl::hresult_type winrt::implements<D, I>::GetIids(winrt::impl::count_type*, winrt::impl::guid_type**) [with D = py::python_iterable<winrt::hstring>::iterator; I = {winrt::Windows::Foundation::Collections::IIterator<winrt::hstring>}; winrt::impl::hresult_type = int; winrt::impl::count_type = unsigned int; winrt::impl::guid_type = winrt::guid]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7197:34:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetIids(uint32_t*, winrt::guid**) [with D = py::python_iterable<winrt::hstring>::iterator; I = winrt::Windows::Foundation::Collections::IIterator<winrt::hstring>; Enable = void; int32_t = int; uint32_t = unsigned int]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7195:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7573:35: error: 'this' pointer is null [-Werror=nonnull]
 7573 |                 return this->outer()->GetIids(count, array);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1766:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetIids(uint32_t*, winrt::guid**)'
 1766 |             virtual int32_t __stdcall GetIids(uint32_t* count, guid** ids) noexcept = 0;
      |                                       ^~~~~~~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h: In instantiation of 'int32_t winrt::impl::root_implements<D, I>::GetIids(uint32_t*, winrt::guid**) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >::iterator; I = {winrt::Windows::Foundation::Collections::IIterator<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >}; int32_t = int; uint32_t = unsigned int]':
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:8163:49:   required from 'winrt::impl::hresult_type winrt::implements<D, I>::GetIids(winrt::impl::count_type*, winrt::impl::guid_type**) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >::iterator; I = {winrt::Windows::Foundation::Collections::IIterator<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >}; winrt::impl::hresult_type = int; winrt::impl::count_type = unsigned int; winrt::impl::guid_type = winrt::guid]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7197:34:   required from 'int32_t winrt::impl::produce_base<D, I, Enable>::GetIids(uint32_t*, winrt::guid**) [with D = py::python_iterable<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >::iterator; I = winrt::Windows::Foundation::Collections::IIterator<winrt::Windows::Foundation::Collections::IKeyValuePair<winrt::hstring, winrt::hstring> >; Enable = void; int32_t = int; uint32_t = unsigned int]'
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7195:27:   required from here
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:7573:35: error: 'this' pointer is null [-Werror=nonnull]
 7573 |                 return this->outer()->GetIids(count, array);
      |                        ~~~~~~~~~~~^~
C:/Users/david/Documents/GitHub/pywinrt/projection/winrt-sdk/src/winrt_sdk/cppwinrt/winrt/base.h:1766:39: note: in a call to non-static member function 'virtual int32_t winrt::impl::abi<winrt::Windows::Foundation::IInspectable>::type::GetIids(uint32_t*, winrt::guid**)'
 1766 |             virtual int32_t __stdcall GetIids(uint32_t* count, guid** ids) noexcept = 0;
      |                                       ^~~~~~~
cc1plus.exe: all warnings being treated as errors

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions