clang and __float128 bug/error

前端 未结 4 1817
迷失自我
迷失自我 2021-02-07 11:29

I\'ve successfully compiled the current 3.3 branch of clang. But then C++ compilation of any file fails with the bug/error. Can that be fixed?

In file included f         


        
4条回答
  •  無奈伤痛
    2021-02-07 11:54

    The solution is to have this declaration. It works like a charm:

    #ifdef __clang__
    typedef struct { long double x, y; } __float128;
    #endif
    

    Solutions with #define don't work because of the template specification redeclaration error.

    Of course this is a hack, and you must be safe. I want clang just for a few experiments, so it won't cause any troubles.

提交回复
热议问题