You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adresses following problems encountered during
libpgmath compilation with the Clang C++ compiler:
* Clang C++ compiler needs explicit casts from C integer types
to stdint's int32_t and int64_t.
* Clang C++ compiler needs qualified names when dealing with
vrd2_t types typedef'ed inside of C++ structures (yet since
desired type is known at the place of use, GNU C++ compiler
can infer itself which of vrd2_t types the author had in mind).
* Clang C++ compiler cannot infer which overloaded conversion
operator to chose when converting between __m128* types.
What GNU C++ compiler does in such a place is:
1. It generates a call to overloaded cast to long double()
operator on __m128-typed value.
2. It generates a call to desired __m128* constructor
overloaded to accept long double,
There were alternative proposals to solve this issue, e.g.
adding better suited overloads of casting operator
(unfortunately, this didn't help) or casting always to
long double (which works with both GNU and Clang compilers,
unfortunately, this approach could not gain acceptance as it
makes the code less meaningful).
The best solution for those issues would be to fix the Clang C++
compiler. To my knowledge it will not happen in the forseeable
future.
Signed-off-by: Paul Osmialowski <[email protected]>
0 commit comments