This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

hypot error


Hi All,I got errors when I tried to use the function hypot. It said " '__builtin_choose_expr' requires a constant expression".I found the error occurs at "__tg_integer" in tgmath.h. It does not treat "(__typeof__(__e1))1.5 == 1" as a constant expression.I am confused that why it's not a constant expression, and how should I fix this.


The code is as follows:


#include <tgmath.h>
int main()
{
double __complex__ z = 0.0;
hypot(__real__ z, __imag__ z);
return 0;
}
Looking forward to your reply!

Thanks and Regards,
Chunxia Du

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]