Vector Class Discussion

 
thread Warnings on gcc 7.1.0 - HolyWu - 2017-06-02
last reply Warnings on gcc 7.1.0 - Agner - 2017-06-02
 
Warnings on gcc 7.1.0
Author: HolyWu Date: 2017-06-02 10:21
It gives the following warnings when compiled with gcc 7.1.0, but not happen with gcc 6.3.0.

vectorclass/vectorf128.h:959:103: warning: optimization attribute on 'Vec4f round(const Vec4f&)' follows definition but the attribute doesn't match [-Wattributes]
static inline Vec4f round(Vec4f const & a) __attribute__ ((optimize("-fno-unsafe-math-optimizations")));

C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/cmath:1771:3: note: previous definition of 'constexpr float std::round(float)' was here
round(float __x)

vectorclass/vectorf128.h:1961:103: warning: optimization attribute on 'Vec2d round(const Vec2d&)' follows definition but the attribute doesn't match [-Wattributes]
static inline Vec2d round(Vec2d const & a) __attribute__ ((optimize("-fno-unsafe-math-optimizations")));

C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/cmath:1771:3: note: previous definition of 'constexpr float std::round(float)' was here
round(float __x)


Best regards,
HolyWu

   
Warnings on gcc 7.1.0
Author: Agner Date: 2017-06-02 11:53
Weird. Is it messing up overloaded functions?