microsoft / DirectXMath

DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps
https://walbourn.github.io/introducing-directxmath/
MIT License
1.54k stars 238 forks source link

Fix compiler warnings (clang 6) #74

Closed walbourn closed 6 years ago

walbourn commented 6 years ago

The previous work to add _XM_NO_XMVECTOR_OVERLOADS_ has made the library build with clang, but it still generates a lot of warnings a number of which indicate conformance issues.

walbourn commented 6 years ago

See this pull request

walbourn commented 6 years ago

To get a 'clean build' you'll need to suppress a bunch of stuff that is likely an issue throughout your codebase:

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wc++98-compat"
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma clang diagnostic ignored "-Wfloat-equal"
#pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
#pragma clang diagnostic ignored "-Wmissing-variable-declarations"
#pragma clang diagnostic ignored "-Wnested-anon-types"
#pragma clang diagnostic ignored "-Wnonportable-include-path"
#pragma clang diagnostic ignored "-Wnonportable-system-include-path"
#pragma clang diagnostic ignored "-Wreserved-id-macro"
#pragma clang diagnostic ignored "-Wundef"
#endif

#include "DirectXMath.h"
#include "DirectXPackedVector.h"
#include "DirectXColors.h"
#include "DirectXCollision.h"
#pragma clang diagnostic pop