[PATCH] [libc++abi] Disallow conversions from function pointers to void*.

Jonathan Roelofs jonathan at codesourcery.com
Fri Apr 3 15:46:07 PDT 2015


================
Comment at: src/private_typeinfo.cpp:390
@@ -389,4 +389,3 @@
     // bullet 3A
-    if (is_equal(__pointee, &typeid(void), false))
-        return true;
-
+    if (is_equal(__pointee, &typeid(void), false)) {
+        // pointers to functions cannot be converted to void*.
----------------
Why would a function pointer have the same typeid as void?

Is it clang that's getting this wrong? Do your new tests pass with GCC as the compiler, but this change reverted?

http://reviews.llvm.org/D8811

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list