[llvm-bugs] [Bug 17410] Allow reinterpret_cast in constant expression when -fms-compatibility is enabled

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 26 17:42:41 PST 2021


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

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|NEW                         |RESOLVED

--- Comment #2 from Reid Kleckner <rnk at google.com> ---
MSVC has warned on this since 19.15: https://gcc.godbolt.org/z/ToG3o4
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4668?view=msvc-160
warning C4644: usage of the macro-based offsetof pattern in constant
expressions is non-standard; use offsetof defined in the C++ standard library
instead

Someone filed a similar issue with microsoft:
https://developercommunity.visualstudio.com/t/field-offset-macro-in-winnth-can-generate-c4644-an/331780

At this point, I don't think clang needs to implement an extension for this.

-- 
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/20210227/ba5ade7a/attachment.html>


More information about the llvm-bugs mailing list