Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 092a7a8

Browse files
committed
SF patch [#466353] Py_HUGE_VAL on BeOS for Intel.
The patch repaired internal gcc compiler errors on BeOS. This checkin repairs them in a simpler way, by explicitly casting the platform INFINITY to double.
1 parent 1538c23 commit 092a7a8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Include/pyport.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,13 @@ extern "C" {
235235
* on some Cray systems HUGE_VAL is incorrectly (according to the C std)
236236
* defined to be the largest positive finite rather than infinity. We need
237237
* the std-conforming infinity meaning (provided the platform has one!).
238+
*
239+
* Then, according to a bug report on SourceForge, defining Py_HUGE_VAL as
240+
* INFINITY caused internal compiler errors under BeOS using some version
241+
* of gcc. Explicitly casting INFINITY to double made that problem go away.
238242
*/
239243
#ifdef INFINITY
240-
#define Py_HUGE_VAL INFINITY
244+
#define Py_HUGE_VAL ((double)INFINITY)
241245
#else
242246
#define Py_HUGE_VAL HUGE_VAL
243247
#endif

0 commit comments

Comments
 (0)