diff options
author | Joseph Myers <joseph@codesourcery.com> | 2017-11-24 22:03:35 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2017-11-24 22:03:35 +0000 |
commit | 9596fc69b188b5a190ed41ac92c0330efef1fdaa (patch) | |
tree | 1424df6ad3798b39477f89401140bd0c3c223ef6 /misc/mkstemp.c | |
parent | 46453c3cdad9575f264a49f003a2a9f2847708c8 (diff) | |
download | glibc-9596fc69b188b5a190ed41ac92c0330efef1fdaa.tar glibc-9596fc69b188b5a190ed41ac92c0330efef1fdaa.tar.gz glibc-9596fc69b188b5a190ed41ac92c0330efef1fdaa.tar.bz2 glibc-9596fc69b188b5a190ed41ac92c0330efef1fdaa.zip |
Make min_of_type_ macros function-like.
math_private.h uses __MATH_TG in defining the min_of_type macro used
within libm, with min_of_type_<suffix> macros for each type. This
runs into problems with __MATH_TG expansions used with additional
_FloatN and _FloatNx type support, because those can end up
macro-expanding the FUNC argument to __MATH_TG before it gets
concatenated with a suffix - meaning that min_of_type_ can't
simultaneously be the macro name for double, and a prefix to other
macro names, since the latter case requires such premature macro
expansion not to occur. (This is not a problem for the uses of
__MATH_TG in installed headers because FUNC there is a function name
in the implementation namespace, and the suffixes themselves don't get
macro-expanded.)
This patch fixes the problem by making min_of_type_<suffix> macros
function-like, so no macro expansion occurs when min_of_type_ is
expanded on its own as a macro argument, only later when followed by
() after expansion.
Tested for x86_64, including in conjunction with _Float64x support
patches.
* sysdeps/generic/math_private.h (min_of_type_f): Make into a
function-like macro.
(min_of_type_): Likewise.
(min_of_type_l): Likewise.
(min_of_type_f128): Likewise.
(min_of_type): Pass () as last argument of __MATH_TG.
Diffstat (limited to 'misc/mkstemp.c')
0 files changed, 0 insertions, 0 deletions