[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-22 Thread STINNER Victor

STINNER Victor added the comment:

> @koobs: sorry, 3.4 now only accept security fixes :-p

I wrote a table giving the status of each Python branch to know which ones 
still accept bugfixes or not:
https://docs.python.org/devguide/#status-of-python-branches

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-20 Thread Stefan Krah

Stefan Krah added the comment:

1) Feedback whether the compiler used on FreeBSD recognizes FENV_ACCESS.

2) If not, an indication why the man page mentions it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-20 Thread STINNER Victor

STINNER Victor added the comment:

Andrew Turner: "Can this be applied?"

koobs: "What remains to be done/identified/answers here to make progress?"

*I* don't understand if replacing fpsetmask() with fedisableexcept() is enough, 
or if we also need to starting putting "#pragma STDC FENV_ACCESS ON" in all .c 
file using a C double? It's not a rhetorical question, I don't understand the 
consequence of the attached patch.

If two FreeBSD developers (Andrew Turner and koobs) are confident, maybe I 
should trust them and apply blindly the patch without trying to understand it 
:-D

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-20 Thread Stefan Krah

Stefan Krah added the comment:

Thanks, then the patch looks good to me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-20 Thread Andrew Turner

Andrew Turner added the comment:

I think this patch is correct.

Clang, as shipped by FreeBSD, doesn't support FENV_ACCESS. It raises the 
following warning:

fenv_test.c:2:14: warning: pragma STDC FENV_ACCESS ON is not supported, 
ignoring pragma [-Wunknown-pragmas]
#pragma STDC FENV_ACCESS ON
 ^
1 warning generated.

I expect the man page mentions it because it is mentioned in the standard. In 
the bugs section it does say the pragma is unimplemented.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-20 Thread koobs

koobs added the comment:

This issue is becoming increasingly important as FreeBSD 11.0-RELEASE time 
nears.

What remains to be done/identified/answers here to make progress?

--
versions: +Python 2.7, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 76f35f35be50 by Victor Stinner in branch '3.5':
Replace fpgetmask() with fedisableexcept()
https://hg.python.org/cpython/rev/76f35f35be50

New changeset 6134d9ecab60 by Victor Stinner in branch 'default':
Merge 3.5 (issue #24520)
https://hg.python.org/cpython/rev/6134d9ecab60

New changeset 394ae9efc5c2 by Victor Stinner in branch '2.7':
Replace fpgetmask() with fedisableexcept()
https://hg.python.org/cpython/rev/394ae9efc5c2

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-20 Thread STINNER Victor

STINNER Victor added the comment:

"I expect the man page mentions it because it is mentioned in the standard. In 
the bugs section it does say the pragma is unimplemented."

Ah ah, funnny. Sorry, I was confused by the manual page.

I pushed your patch to Python 2.7, 3.5 and default (3.6) branches.

@koobs: sorry, 3.4 now only accept security fixes :-p

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-03 Thread Andrew Turner

Andrew Turner added the comment:

Can this be applied?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

It looks like fpsetmask() was deprecated since many years, and that 
fedisableexcept() is available since FreeBSD 5.3. Since we try to support 
FreeBSD 9, it's fine to drop support of FreeBSD < 5.3.

I'm concerned by the "CAVEATS" section below. Should we put "#pragma STDC 
FENV_ACCESS ON" in all .c file using a C double?

@skrah: I saw this pragma in Modules/_decimal/libmpdec/mpdecimal.c. Any idea if 
applying this patch is fine?

Maybe we can start by applying it to the default branch?

If this patch is required to support arm64, I think that it's ok to apply it to 
2.7, 3.4 and 3.5 since we still accept changes to fix platform compatibility 
issues.

http://www.unix.com/man-page/freebsd/3/fpsetmask/
---
DESCRIPTION
 The routines described herein are deprecated.  New code should use the 
functionality provided by fenv(3).
---

http://www.unix.com/man-page/freebsd/3/fenv/
---
HISTORY
 The  header first appeared in FreeBSD 5.3.  It supersedes the 
non-standard routines defined in  and documented in fpgetround(3).

CAVEATS
 The FENV_ACCESS pragma can be enabled with
   #pragma STDC FENV_ACCESS ON
---

--
nosy: +haypo, skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread Stefan Krah

Stefan Krah added the comment:

Regarding volatile: gcc/clang seem to honor *some* changes to
the control word. At least in libmpdec both compilers have
always left the settings 80bit-prec/ROUND_CHOP intact, even
though it's not the default.

Let's rewrite Python in asm to avoid these issues. :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread Stefan Krah

Stefan Krah added the comment:

In theory we should set FENV_ACCESS whenever the control word is
changed (C99):

"If part of a program tests floating-point status flags, sets
floating-point control modes, or runs under non-default mode
settings, but was translated with the state for the FENV_ACCESS
pragma "off", the behavior is undefined."


In practice gcc ignores the pragma, icc and cl.exe use it, not
sure about clang.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

FYI in Python/pytime.c, I put a lot of "volatile double" when tests started to 
fail on some platforms. It's inefficient, but it's easier than teaching how to 
disable optimizations on each different compiler :-p

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread Stefan Krah

Stefan Krah added the comment:

Ok, clang does not support it either:

https://llvm.org/bugs/show_bug.cgi?id=10409

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-09-21 Thread STINNER Victor

STINNER Victor added the comment:

Sorry, I don't understand if we should apply or not the patch :-/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-07-03 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +mark.dickinson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24520
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-06-30 Thread Ed Maste

Changes by Ed Maste carpedd...@gmail.com:


--
nosy: +emaste

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24520
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-06-30 Thread koobs

Changes by koobs koobs.free...@gmail.com:


--
keywords: +needs review
nosy: +koobs

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24520
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2015-06-27 Thread Andrew Turner

New submission from Andrew Turner:

The attached patch moves to use the fenv functions on FreeBSD to control the 
floating-point environment. This will be needed as I don't expect FreeBSD will 
have these functions on arm64.

I would expect a similar change should be applied to any supported development 
branch.

--
components: Interpreter Core
files: use_fenv_freebsd.diff
keywords: patch
messages: 245879
nosy: Andrew Turner
priority: normal
severity: normal
status: open
title: Stop using deprecated floating-point environment functions on FreeBSD
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file39822/use_fenv_freebsd.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24520
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com