History log of /freebsd-10.0-release/include/tgmath.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 249995 27-Apr-2013 ed

Enable improved <tgmath.h> for Clang even when not using C11.

By using __has_extension(c_generic_selections), we can explicitly test
whether we're dealing with a version of Clang that supports _Generic().
That way we can use the improved <tgmath.h> code, even when not using
-std=c11. This massively reduces the compilation time when invoking
these functions.


# 229716 06-Jan-2012 ed

Last attempt at <tgmath.h>: do enable the new code for C11 compilers.

I was thinking by myself, if the new code doesn't work with GCC 4.2, why
not simply turn it into an efficient version for C11 compilers? By
changing the code to use _Generic() directly in that case, I can build
the tgmath regression test in a matter of milliseconds with Clang,
instead of the 8 seconds it used to take.

So by the time C11 becomes the default, it will pick up the new code
automatically. And now I will refrain from making more changes to
<tgmath.h>.


# 229704 06-Jan-2012 ed

Add an even faster implementation of <tgmath.h> for the future.

Instead of using an exponential number of cases with respect to the
number of arguments, this version only uses a linear number.
Unfortunately, it works with Clang, GCC 4.6 and GCC 4.7, but not GCC
4.2. Therefore, leave it commented out.


# 229591 05-Jan-2012 ed

Remove _Complex_I workaround from <tgmath.h>.

This removes the use of __typeof() from this header, thus making it work
with a plain C11 compiler.


# 229575 05-Jan-2012 ed

Reimplement <tgmath.h> on top of __generic().

The macro construction used now, is almost identical to the code
provided in C11 proposal N1404. This new version doesn't seem to
introduce any regressions according to the regression test in tools/,
but still seems to malfunction with Clang on certain aspects.

The new code does work successfully with GCC 4.2, 4.6 and 4.7. With 4.7,
it also works when __generic() is implemented on top of _Generic().

Discussed with: stefanf


# 166432 02-Feb-2007 schweikh

Properly parenthesize the __tg_is_complex() macro by moving a closing
paren to where it belongs.

MFC after: 7 days


# 134736 03-Sep-2004 stefanf

Add a workaround to recognise I/_Complex_I as complex arguments. Although
the GCC manual claims that the expression 1.0fi has type float _Complex,
__builtin_types_compatible_p(float _Complex, __typeof__(1.0fi))) yields 0.


# 134735 03-Sep-2004 stefanf

Use the keyword '_Complex' rather than the macro 'complex' since
applications are allowed to undefine the latter.


# 134733 03-Sep-2004 stefanf

Embarrassing typo: s/nextbyint/nearbyint/


# 133333 08-Aug-2004 stefanf

Implement C99's standard header <tgmath.h>. It provides type-generic macros
for the <math.h> and <complex.h> functions that have float, double and long
double implementations. Such type-generic macros expand to an actual
function, depending on the types of the macro arguments, eg. if <tgmath.h>
is included, the invocation cos(1.0f) calls the function cosf().