Alexandre Julliard (@julliard) commented about dlls/msvcrt/cxx.h:
+#define DEFINE_CXX_TYPE2(type, flags, ti_flags, dtor, copyctor, ...) \ static cxx_type_info type ## _cxx_type_info[1] = \
- { { 0, 0xdeadbeef, { 0, -1, 0 }, sizeof(type), 0xdeadbeef } }; \
- { { ti_flags, 0xdeadbeef, { 0, -1, 0 }, sizeof(type), 0xdeadbeef } }; \
\ -static const void * const type ## _cxx_type_classes[] = { type ## _cxx_type_info, __VA_ARGS__ }; \ +static const void * const type ## _cxx_type_classes[] = { __VA_ARGS__ }; \ static cxx_type_info_table type ## _cxx_type_table = { ARRAY_SIZE(type ## _cxx_type_classes) }; \ -static cxx_exception_type type ##_exception_type; \ +static cxx_exception_type type ##_exception_type = {flags}; \ \ static void init_ ## type ## _cxx(char *base) \ { \ type ## _cxx_type_info[0].type_info = (char *)&type ## _type_info - base; \
- type ## _cxx_type_info[0].copy_ctor = (char *)type ## _copy_ctor - base; \
- type ## _cxx_type_info[0].copy_ctor = (copyctor) ? (char *)(copyctor) - base : 0; \
This is causing warnings with gcc 15:
``` ../wine/dlls/msvcrt/cpp.c: In function ‘init_exception_cxx’: ../wine/dlls/msvcrt/cxx.h:211:54: error: the address of ‘exception_copy_ctor’ will always evaluate as ‘true’ [-Werror=address] ../wine/dlls/msvcrt/cxx.h:223:5: note: in expansion of macro ‘DEFINE_CXX_TYPE2’ ../wine/dlls/msvcrt/cpp.c:580:1: note: in expansion of macro ‘DEFINE_CXX_TYPE’ ../wine/dlls/msvcrt/cxx.h:214:54: error: the address of ‘exception_dtor’ will always evaluate as ‘true’ [-Werror=address] ../wine/dlls/msvcrt/cxx.h:223:5: note: in expansion of macro ‘DEFINE_CXX_TYPE2’ ../wine/dlls/msvcrt/cpp.c:580:1: note: in expansion of macro ‘DEFINE_CXX_TYPE’ ```