This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC Patch]: Implement remainder() as built-in function [PR fortran/24518]


On Oct 24, 2006, at 1:45 AM, Richard Guenther wrote:
One problem is that gcc does currently not know how to access the errno location, so it has to dispatch to libc always for this.

:-) Seems like we could autoconf for it. If #include <math.h> has a #define for it, we can do something like:


  #include <math.h>
  __set_errno(int i) { errno = i; }

in libgcc. If no #define, we could ensure the size of the type is the same size as int, and have in internal extern int variable that we can modify directly. Or, maybe we always want to escape out to libgcc, just so that when they threadize libc, one only needs a newer libgcc shared library to cause older libraries to just work.

For systems that fall outside of the general rules, they can be burdened to add code to cope.

In the long term, seems like we might want to have the infrastructure in place.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]