[llvm-bugs] [Bug 28250] clang-cl does not consider __m128 to be a struct type

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 4 09:53:03 PDT 2018


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

Stephen Kelly <steveire at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steveire at gmail.com
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Stephen Kelly <steveire at gmail.com> ---
FYI, newer Windows 10 SDKs (10.0.17134.0 and I didn't check others) are not
affected by this anymore.


$ type directx.cpp

#include <um/DirectXMath.h>

int main()
{
    return 0;
}

$ cl.exe -I"c:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0"
directx.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.14.26430 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

directx.cpp
Microsoft (R) Incremental Linker Version 14.14.26430.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:directx.exe
directx.obj

$ C:\dev\src\llvm\build\releaseprefix\msbuild-bin\CL.exe -I"c:\Program Files
(x86)\Windows Kits\10\Include\10.0.17134.0" directx.cpp
directx.cpp

$ C:\dev\src\llvm\build\releaseprefix\msbuild-bin\CL.exe -I"c:\Program Files
(x86)\Windows Kits\10\Include\10.0.10586.0" directx.cpp
directx.cpp
In file included from directx.cpp:2:
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(366,29):  error: overloaded
'operator+' must have at least one parameter of class or enumeration type
XMVECTOR    XM_CALLCONV     operator+ (FXMVECTOR V);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(367,29):  error: overloaded
'operator-' must have at least one parameter of class or enumeration type
XMVECTOR    XM_CALLCONV     operator- (FXMVECTOR V);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(369,29):  error: overloaded
'operator+=' must have at least one parameter of class or enumeration type
XMVECTOR&   XM_CALLCONV     operator+= (XMVECTOR& V1, FXMVECTOR V2);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(370,29):  error: overloaded
'operator-=' must have at least one parameter of class or enumeration type
XMVECTOR&   XM_CALLCONV     operator-= (XMVECTOR& V1, FXMVECTOR V2);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(371,29):  error: overloaded
'operator*=' must have at least one parameter of class or enumeration type
XMVECTOR&   XM_CALLCONV     operator*= (XMVECTOR& V1, FXMVECTOR V2);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(372,29):  error: overloaded
'operator/=' must have at least one parameter of class or enumeration type
XMVECTOR&   XM_CALLCONV     operator/= (XMVECTOR& V1, FXMVECTOR V2);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(374,13):  error: overloaded
'operator*=' must have at least one parameter of class or enumeration type
XMVECTOR&   operator*= (XMVECTOR& V, float S);
            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(375,13):  error: overloaded
'operator/=' must have at least one parameter of class or enumeration type
XMVECTOR&   operator/= (XMVECTOR& V, float S);
            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(377,29):  error: overloaded
'operator+' must have at least one parameter of class or enumeration type
XMVECTOR    XM_CALLCONV     operator+ (FXMVECTOR V1, FXMVECTOR V2);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(378,29):  error: overloaded
'operator-' must have at least one parameter of class or enumeration type
XMVECTOR    XM_CALLCONV     operator- (FXMVECTOR V1, FXMVECTOR V2);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(379,29):  error: overloaded
'operator*' must have at least one parameter of class or enumeration type
XMVECTOR    XM_CALLCONV     operator* (FXMVECTOR V1, FXMVECTOR V2);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(380,29):  error: overloaded
'operator/' must have at least one parameter of class or enumeration type
XMVECTOR    XM_CALLCONV     operator/ (FXMVECTOR V1, FXMVECTOR V2);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(381,29):  error: overloaded
'operator*' must have at least one parameter of class or enumeration type
XMVECTOR    XM_CALLCONV     operator* (FXMVECTOR V, float S);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(382,29):  error: overloaded
'operator*' must have at least one parameter of class or enumeration type
XMVECTOR    XM_CALLCONV     operator* (float S, FXMVECTOR V);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(383,29):  error: overloaded
'operator/' must have at least one parameter of class or enumeration type
XMVECTOR    XM_CALLCONV     operator/ (FXMVECTOR V, float S);
                            ^
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(1506,105):  warning: expression
result unused [-Wunused-value]
template<> inline XMVECTOR      XM_CALLCONV    
XMVectorPermute<0,1,2,3>(FXMVECTOR V1, FXMVECTOR V2) { (V2); return V1; }
                                                                               
                        ^~
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h(1507,105):  warning: expression
result unused [-Wunused-value]
template<> inline XMVECTOR      XM_CALLCONV    
XMVectorPermute<4,5,6,7>(FXMVECTOR V1, FXMVECTOR V2) { (V1); return V2; }
                                                                               
                        ^~
In file included from directx.cpp:2:
In file included from c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMath.h:1902:
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMathVector.inl(412,13):  error: member
reference base type 'DirectX::FXMVECTOR' (aka 'const __m128') is not a
structure or union
    return V.m128_f32[i];
           ~^~~~~~~~~
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMathVector.inl(482,11):  error: member
reference base type 'DirectX::FXMVECTOR' (aka 'const __m128') is not a
structure or union
    *f = V.m128_f32[i];
         ~^~~~~~~~~
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMathVector.inl(560,13):  error: member
reference base type 'DirectX::FXMVECTOR' (aka 'const __m128') is not a
structure or union
    return V.m128_u32[i];
           ~^~~~~~~~~
c:\Program Files (x86)\Windows
Kits\10\Include\10.0.10586.0\um/DirectXMathVector.inl(631,11):  error: member
reference base type 'DirectX::FXMVECTOR' (aka 'const __m128') is not a
structure or union
    *x = V.m128_u32[i];
         ~^~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.

-- 
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/20180704/ef258c42/attachment-0001.html>


More information about the llvm-bugs mailing list