Date: Tue, 16 Dec 2014 08:20:55 -0800 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: Ed Schouten <ed@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r275819 - in head/lib/msun: ld128 ld80 src Message-ID: <20141216162055.GA64273@troutmask.apl.washington.edu> In-Reply-To: <201412160921.sBG9LvFY064961@svn.freebsd.org> References: <201412160921.sBG9LvFY064961@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 16, 2014 at 09:21:57AM +0000, Ed Schouten wrote: > Author: ed > Date: Tue Dec 16 09:21:56 2014 > New Revision: 275819 > URL: https://svnweb.freebsd.org/changeset/base/275819 > > Log: > Rename cpack*() to CMPLX*(). This seems like a lot of code churn for very little benefit. In particular, I know that the one person working on fixing problems with FreeBSD's libm has a private repo and the openlibm and android developers base their libm off of FreeBSD's libm and now they'll need to resync their codebases and resolve conflicts. > Modified: head/lib/msun/src/math_private.h > ============================================================================== > --- head/lib/msun/src/math_private.h Tue Dec 16 08:29:02 2014 (r275818) > +++ head/lib/msun/src/math_private.h Tue Dec 16 09:21:56 2014 (r275819) > @@ -454,9 +454,16 @@ typedef union { > * (0.0+I)*(y+0.0*I) and laboriously computing the full complex product. > * In particular, I*Inf is corrupted to NaN+I*Inf, and I*-0 is corrupted > * to -0.0+I*0.0. > + * > + * The C11 standard introduced the macros CMPLX(), CMPLXF() and CMPLXL() > + * to construct complex values. The functions below are modelled after > + * these macros, with the exception that they cannot be used to > + * construct compile-time complex values. This comment isn't true! These functions pre-date C11 by years. See r151865. These functions were designed to deal with gcc's poorly implemented I. See the paragraph above your comment. > */ > + > +#ifndef CMPLXF > static __inline float complex > -cpackf(float x, float y) > +CMPLXF(float x, float y) > { > float_complex z; > > @@ -464,9 +471,11 @@ cpackf(float x, float y) > IMAGPART(z) = y; > return (z.f); > } > +#endif Why not use a much less invasive change? #ifdef CMPLXF #define cpackf(x, y) CMPLXF((x), (y)) #else static __inline float complex cpackf(float x, float y) { float_complex z; REALPART(z) = x; IMAGPART(z) = y; return (z.f); } #endif -- steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141216162055.GA64273>