This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to default to -fno-math-errno on all FreeBSD targets
On Tue, Feb 08, 2011, Richard Guenther wrote:
> On Mon, Feb 7, 2011 at 9:37 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> > On Mon, Feb 7, 2011 at 2:55 AM, Richard Guenther
> > <richard.guenther@gmail.com> wrote:
> >> Does FreeBSD ever set errno for malloc() calls? ?See PR47179 and
> >> PR42944 - which means it might require splitting the flag into a
> >> math piece and a general piece (or one covering just malloc & friends).
> >
> > The option's documentation (and the name itself) says it is a math
> > piece anyways. ?So I don't see why need to split it up?
>
> Because we (ab-)use it for malloc as well as there is no way for the
> Fortran frontend to specify it doesn't care for errno at all. Thus,
> we probably need a -fno-non-math-errno (ick).
FreeBSD does set errno in malloc(), but does not ship with the
Fortran frontend. The undocumented abuse of -fno-math-errno to
affect gcc's model for malloc() sounds insidious.