forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbd1463e
committed
Error out for clang on x86-32 without SSE2 support, no -fexcess-precision.
As clang currently doesn't support -fexcess-precision=standard,compiling x86-32 code with SSE2 disabled, can lead to problems withfloating point overflow checks and the like.This issue was noticed because clang, on at least some BSDs, defaultsto i386 compatibility, whereas it defaults to pentium4 on Linux. Ourforced usage of __builtin_isinf() lead to some overflow checks nottriggering when compiling for i386, e.g. when the result of thecalculation didn't overflow in 80bit registers, but did so in 64bit.While we could just fall back to a non-builtin isinf, it seems likelythat the use of 80bit registers leads to other problems (which is whywe force the flag for GCC already). Therefore error out whendetecting clang in that situation.Reported-By: Victor WagnerAnalyzed-By: Andrew Gierth and Andres FreundAuthor: Andres FreundDiscussion:https://postgr.es/m/20180905005130.ewk4xcs5dgyzcy45@alap3.anarazel.deBackpatch: 9.3-, all supported versions are affected1 parent925673f commitbd1463e
2 files changed
+51
-0
lines changedLines changed: 33 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7023 | 7023 |
| |
7024 | 7024 |
| |
7025 | 7025 |
| |
| 7026 | + | |
| 7027 | + | |
| 7028 | + | |
| 7029 | + | |
| 7030 | + | |
| 7031 | + | |
| 7032 | + | |
| 7033 | + | |
| 7034 | + | |
| 7035 | + | |
| 7036 | + | |
| 7037 | + | |
| 7038 | + | |
| 7039 | + | |
| 7040 | + | |
| 7041 | + | |
| 7042 | + | |
| 7043 | + | |
| 7044 | + | |
| 7045 | + | |
| 7046 | + | |
| 7047 | + | |
| 7048 | + | |
| 7049 | + | |
| 7050 | + | |
| 7051 | + | |
| 7052 | + | |
| 7053 | + | |
| 7054 | + | |
| 7055 | + | |
| 7056 | + | |
| 7057 | + | |
| 7058 | + | |
7026 | 7059 |
| |
7027 | 7060 |
| |
7028 | 7061 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
624 | 624 |
| |
625 | 625 |
| |
626 | 626 |
| |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
627 | 645 |
| |
628 | 646 |
| |
629 | 647 |
| |
|
0 commit comments
Comments
(0)