This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add TARGET_GNU_SINCOS target macro
On Thu, 18 Jan 2007, Richard Guenther wrote:
> On Wed, 17 Jan 2007, Kaveh R. GHAZI wrote:
>
> > On Wed, 17 Jan 2007, Richard Guenther wrote:
> > >
> > > This adds a TARGET_GNU_SINCOS target macro to tell whether the target
> > > has a sincos implementation conforming to GNU.
> > > Richard.
> >
> > What do you mean "conforming to GNU"? Does it rely on something specific
> > to the glibc implementation? Other systems provide sincos, e.g. Solaris10
> > and later. Can we name it something more generic since other platforms
> > will consider enabling it?
>
> sincos is a GNU extension, so we require the same function prototypes
>
> void sincos(double x, double *sin, double *cos);
> void sincosf(float x, float *sin, float *cos);
> void sincosl(long double x, long double *sin, long double *cos);
>
> therefore the name.
> Richard.
I still don't see anything GNU specific about it. Solaris10 has these
prototypes:
%uname -rs
SunOS 5.10
%grep sincos /usr/include/math.h
extern void sincos __P((double, double *, double *));
extern void sincosf __P((float, float *, float *));
extern void sincosl __P((long double, long double *, long double *));
Here's a link showing the same thing for hpux11.
http://docs.hp.com/en/B2355-60105/sincos.3M.html
I agree its an extension, but what makes you say its a "GNU extension"?
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu