tgmath
Javier Múgica
javier_3 at runbox.com
Wed Jun 10 07:23:17 PDT 2015
Hello:
I suppose all of you in this list are also in the cfe-dev list, so you probably know about this. Given that I defined auxiliary macros an then used them all throughout the file, a diffs listing would be pointless, virtually everything has changed. Therefore, I also send the corresponding preprocessed files for both the old and the new one, just in case someone wants to compare them.
The file I send here is the same I sent a few days ago to the cfe-dev list but for the correction of a silly-obvious mistake and the splitting of some long lines, following the llvm programming style guide.
For those of you who will be reviewing my changes, here is an explanation:
1st. Guard against libraries not supporting complex types:
#if defined(__STDC_NO_COMPLEX__) || !__has_include_next(<complex.h>)
#define _TG_NO_COMPLEX
#endif
And if you search for _TG_NO_COMPLEX you wil find where it is needed. The uses are self-explanatory.
2nd. Helper macros for defining the functions. These are the definitions from
// Macros for defining the functions
till
// End of macros for defining the functions
And then come the function definitions. Where the old file had, for instance,
static float
_TG_ATTRS
__tg_fabs(float __x) {return fabsf(__x);}
static double
_TG_ATTRS
__tg_fabs(double __x) {return fabs(__x);}
static long double
_TG_ATTRS
__tg_fabs(long double __x) {return fabsl(__x);}
I have
__define_function_real(fabs)
And the whole file is like that, so you see how useless a diffs report would be.
Regards
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tgmath-new.h
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150610/69c90666/attachment.h>
More information about the cfe-commits
mailing list