History

disable nan test for clang

herman ten brugge committed 5 years ago

Commit 81fec841 parent 77a6a911 file · +10 −1Browse files

Unified · Split

tests/tcctest.c+10−1
@@ -2128,6 +2128,15 @@ float strtof(const char *nptr, char **endptr); · 2127 unmodified lines
21282128 LONG_DOUBLE strtold(const char *nptr, char **endptr);
21292129 #endif
21302130
2131+#if CC_NAME == CC_clang
2132+/* In clang 0.0/0.0 is nan and not -nan.
2133+ Also some older clang version do v=-v
2134+ as v = -0 - v */
2135+static char enable_nan_test = 0;
2136+#else
2137+static char enable_nan_test = 1;
2138+#endif
2139+
21312140 #define FTEST(prefix, typename, type, fmt)\
21322141 void prefix ## cmp(type a, type b)\
21332142 {\
@@ -2243,7 +2252,7 @@ void prefix ## test(void)\ · 109 unmodified lines
22432252 prefix ## fcast(-2334.6);\
22442253 prefix ## call();\
22452254 prefix ## signed_zeros();\
2246− prefix ## nan();\
2255+ if (enable_nan_test) prefix ## nan();\
22472256 }
22482257
22492258 FTEST(f, float, float, "%f")

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t