diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-12-17 16:34:41 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-12-17 16:43:09 -0500 |
commit | 5ff2a118c64224789b7286830912425e58831b2b (patch) | |
tree | 9d017e79d086e49919b728a18a2fabcffb43e78d /include/err.h | |
parent | a414e8374dfe32f5efd35a49592698f89878de1f (diff) | |
download | musl-5ff2a118c64224789b7286830912425e58831b2b.tar.gz |
fix definition of CMPLX macros in complex.h to work in constant expressions
based on patches by Jens Gustedt. these macros need to be usable in
static initializers, and the old definitions were not.
there is no portable way to provide correct definitions for these
macros unless the compiler supports pure imaginary types. a portable
definition is provided for this case even though there are presently
no compilers that can use it. gcc and compatible compilers provide a
builtin function that can be used, but clang fails to support this and
instead requires a construct which is a constraint violation and which
is only a constant expression as a clang-specific extension.
since these macros are a namespace violation in pre-C11 profiles, and
since no known pre-C11 compilers provide any way to define them
correctly anyway, the definitions have been made conditional on C11.
Diffstat (limited to 'include/err.h')
0 files changed, 0 insertions, 0 deletions