<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/63021>63021</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            error: type-punning to incomplete type might break strict-aliasing rules [-Werror=strict-aliasing]
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          nickdesaulniers
      </td>
    </tr>
</table>

<pre>
    ```
$ libcxx/utils/ci/run-buildbot generic-debug-mode
...
FAILED: libunwind/src/CMakeFiles/unwind_shared_objects.dir/libunwind.cpp.o 
/usr/bin/c++ -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/android0/llvm-project/libunwind/include -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -fdata-sections -O2 -g -DNDEBUG -fPIC -Werror=return-type -funwind-tables -nostdinc++ -D_DEBUG -UNDEBUG -D_LIBUNWIND_IS_NATIVE_ONLY -Wall -Wextra -Wshadow -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wformat-nonliteral -Wstrict-aliasing=2 -Wstrict-overflow=4 -Wno-attributes -Wno-literal-suffix -Wno-c++14-compat -Wno-noexcept-type -Wno-suggest-override -Werror -pedantic -fno-rtti -std=c++11 -fstrict-aliasing -fno-exceptions -fno-rtti -MD -MT libunwind/src/CMakeFiles/unwind_shared_objects.dir/libunwind.cpp.o -MF libunwind/src/CMakeFiles/unwind_shared_objects.dir/libunwind.cpp.o.d -o libunwind/src/CMakeFiles/unwind_shared_objects.dir/libunwind.cpp.o -c /android0/llvm-project/libunwind/src/libunwind.cpp
/android0/llvm-project/libunwind/src/libunwind.cpp:39:23: error: type-punning to incomplete type might break strict-aliasing rules [-Werror=strict-aliasing]
   39 | (unw_addr_space_t)&LocalAddressSpace::sThisAddressSpace;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
So when using g++ as the bootstrapping compiler, we trigger an instance of `-Wstrict-aliasing`.
cc @compnerd 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8Vk1v27oS_TX0hqAhU7YbL7xQ7Kg1EDtBnD6jK4EiR_K8UqQeP_LRxfvtF7TcpG1ygeKiuEFg2EPOmTM8ZygJ77E1AEsyuySz9UjEcLRuaVB-VeBF1AbB-VFt1fOSzLPzf7YmWUH4lGqs5dMT4WUMqD3hpUTCSxcNqyNqVdtAWzDgUDIFdWxZZxUM6ePxePhSFpvrqzXJi4QWzSMaRXjpnSS8XG3FVyhRQ8Ie1ip_FA5UZev_ggx-rNARXr6kjmXfjy39TrGMPi3XaBI5wi8Jv6RsXV1vLle3t9WnYl_tbqrbu-Ljtqj2X_b3V9vq01WxvrpLu6r9_XpVrW52-_tid19ti9Xdzf51oby52xZvw9eb7eY1uiG8FEY5iypLRPVDx3pnE_kfeRNeopE6KqCseUCPNWoMzwyNRgOeHVEpMJQdwDnrSL5WIgAL2KX9xjKNDaRfTHmg7CC0TnufghOUHYxl0UQPivXCiQ4COMoOjw4DMB8cmtZTdpDCB_a_KPSQ0aH3aFrWIGjF0GBAofEbuLQXu16jxMAaoXU4Ohvb45AmtfCeddAJKcH7IehARaOECayzDzDEevAeO_yWarxGjYUnCX1g4blPIQUaAjBjDXtAF6LQTAWb6PvYtuADsw_gHKpzvrRdBya8tKBBqFQBjQITRECbDlEGoVgnnmtg0fjY99YFUJQ1CkVrrA8o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