|
Message-ID: <20240724181635.GE10433@brightrain.aerifal.cx> Date: Wed, 24 Jul 2024 14:16:35 -0400 From: Rich Felker <dalias@...c.org> To: libc-coord@...ts.openwall.com Subject: Re: #pragma STDC FENV_ACCESS ON On Thu, Jul 18, 2024 at 01:28:02PM -0400, enh wrote: > has anyone else considered adding `#pragma STDC FENV_ACCESS ON` to > <fenv.h>? expecting callers to realize they [might] have to do this > [depending on their compiler and architecture] if they want to safely > use most of the functions in <fenv.h> doesn't seem to be working out > too well, even for libm authors... > > all the choices seem bad. That wouldn't even help because the compilers don't honor it. You need nondefault CFLAGS instead. And even if it did help, it would just be facilitating wrong/nonportable code. The reason nobody's using it is that the compilers ignore it (and IIRC at least at one point even spammed warnings to that effect). Get the compilers fixed, teach them to issue warnings when fenv functions are called without the pragma in effect, and everything else will fix itself.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.