[llvm-bugs] [Bug 38927] New: static_assert yields the wrong result when dereferencing a void*

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 13 04:01:25 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38927

            Bug ID: 38927
           Summary: static_assert yields the wrong result when
                    dereferencing a void*
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: delrieutheo at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

Created attachment 20874
  --> https://bugs.llvm.org/attachment.cgi?id=20874&action=edit
Failed static_assert with operator*(void*)

Hello,

I've been playing with the detected idiom lately, and I came accross a bug
related to void pointers.

For the record, I found two bugs in GCC with operator-(void*, void*) and
operator-=(void*, void*).

Clang fails with operator*(void*), please see the attachment for a small
example.

Expected result: the static_assert passes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180913/02bea89a/attachment.html>


More information about the llvm-bugs mailing list