[libcxx-commits] [PATCH] D109047: [Unwind] Harmonise exception class for EHABI spec.

Hans Wennborg via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 2 09:19:15 PDT 2021


hans added inline comments.


================
Comment at: libunwind/src/UnwindLevel1-gcc-ext.c:112
   memset(&ex, '\0', sizeof(ex));
-  ex.exception_class = 0x434C4E47554E5700; // CLNGUNW\0
+  strcpy(&ex.exception_class, "CLNGUNW");
 #endif
----------------
We're seeing a -Wincompatible-pointer-types warning here (which we treat as an error) in Chromium:

```
../../buildtools/third_party/libunwind/trunk/src/UnwindLevel1-gcc-ext.c:112:10: error: incompatible pointer types passing '_Unwind_Exception_Class *' (aka 'uint8_t (*)[8]') to parameter of type 'char *' [-Werror,-Wincompatible-pointer-types]
  strcpy(&ex.exception_class, "CLNGUNW");
         ^~~~~~~~~~~~~~~~~~~
```

I see in libunwind/test/forceunwind.pass.cpp you're casting the pointer to char*, maybe that's needed here too?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109047



More information about the libcxx-commits mailing list