[libcxx-commits] [PATCH] D120633: [libc++] Better handling for zero-sized types

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 28 16:12:29 PST 2022


philnik added a comment.

In D120633#3350002 <https://reviews.llvm.org/D120633#3350002>, @Quuxplusone wrote:

> Address review comments. `UNSUPPORTED: msvc`.
>
> Restore the check for `is_void` too. Geez, these super-helpful compilers just let us `delete` anything, in a system header! I wonder what the generated code actually does at runtime...
>
> https://reviews.llvm.org/harbormaster/unit/view/2823801/ is due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104568 so `UNSUPPORTED: gcc-11` for this test (it's not super important to test, and we can reenable the test when GCC fixes their ICE)

You are also allowed to do this in user code. Good to know I should just add `-Werror=delete-incomplete` to any project. https://godbolt.org/z/vv194v6rs looks like the destructor just doesn't get called. Creepy.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120633/new/

https://reviews.llvm.org/D120633



More information about the libcxx-commits mailing list