Files
Iain Buclaw 5a0aa603b2 d: Merge upstream dmd 3b808e838, druntime 483bc129, phobos f89dc217a
D front-end changes:

 - Explicit package visibility attribute is now always applied to
   introducing scopes.

 - Added `__traits(totype, string)' to convert mangled type string to an
   existing type.

 - Printf-like and scanf-like functions are now detected by prefixing
   them with `pragma(printf)' for printf-like functions or
   `pragma(scanf)' for scanf-like functions.

 - Added `__c_wchar_t', `__c_complex_float', `__c_complex_double', and
   `__c_complex_real' types for interfacing with C and C++.

 - Template alias parameters can now be instantiated with basic types,
   such as `int` or `void function()`.

 - Mixins can now be used as types in the form `mixin(string) var'.

 - Mixin expressions can take an argument list, same as `pragma(msg)'.

 - Implement DIP1034, add `typeof(*null)' types to represent `noreturn'.

 - `pragma(msg)' can print expressions of type `void'.

 - It is now an error to use private variables selectively imported from
   other modules.  Due to a bug, some imported private members were
   visible from other modules, violating the specification.

 - Added new syntax to declare an alias to a function type using the
   `alias' syntax based on the assignment operator.

 - Function literals can now return a value by reference.

Phobos changes:

 - Synchronize C bindings with the latest port fixes in upstream druntime.

 - Added alias for a `noreturn' type in object.d

 - Make use of the new `pragma(printf)' and `pragma(scanf)' pragmas, fix
   all code that got flagged as being incorrect.

 - Fixed code that relied on bugs in the D import package system.

Reviewed-on: https://github.com/dlang/dmd/pull/12339
	     https://github.com/dlang/druntime/pull/3422
	     https://github.com/dlang/phobos/pull/7932

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 3b808e838.
	* Make-lang.in (D_FRONTEND_OBJS): Add d/chkformat.o.
	* d-codegen.cc (build_struct_literal): Handle special enums.
	* d-convert.cc (convert_expr): Handle noreturn type.
	(convert_for_condition): Likewise.
	* d-target.cc (Target::_init): Set type for wchar_t.
	(TargetCPP::derivedClassOffset): New method.
	(Target::libraryObjectMonitors): New method.
	* decl.cc (get_symbol_decl): Set TREE_THIS_VOLATILE for functions of
	type noreturn.
	* toir.cc (IRVisitor::visit (ReturnStatement *)): Handle returning
	noreturn types.
	* types.cc (TypeVisitor::visit (TypeNoreturn *)): New method.
	(TypeVisitor::visit (TypeEnum *)): Handle special enums.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 483bc129.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_DARWIN): Add
	core/sys/darwin/fcntl.d.
	(DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/unistd.d.
	(DRUNTIME_DSOURCES_WINDOWS): Add core/sys/windows/stdc/malloc.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos f89dc217a.
	* src/Makefile.am (PHOBOS_DSOURCES): Add std/regex/internal/tests2.d.
	* src/Makefile.in: Regenerate.
	* testsuite/libphobos.exceptions/chain.d: Fix format arguments.
	* testsuite/libphobos.exceptions/line_trace.d: Likewise.
2021-04-04 01:26:20 +02:00

116 lines
2.7 KiB
D

/**
* D header file for C99.
*
* $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_complex.h.html, _complex.h)
*
* Copyright: Copyright Sean Kelly 2005 - 2009.
* License: Distributed under the
* $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
* (See accompanying file LICENSE)
* Authors: Sean Kelly
* Source: $(DRUNTIMESRC core/stdc/_complex.d)
* Standards: ISO/IEC 9899:1999 (E)
*/
module core.stdc.complex;
extern (C):
@trusted: // All of these operate on floating point values only.
nothrow:
@nogc:
// @@@DEPRECATED_2.105@@@
deprecated:
alias creal complex;
alias ireal imaginary;
cdouble cacos(cdouble z);
cfloat cacosf(cfloat z);
creal cacosl(creal z);
cdouble casin(cdouble z);
cfloat casinf(cfloat z);
creal casinl(creal z);
cdouble catan(cdouble z);
cfloat catanf(cfloat z);
creal catanl(creal z);
cdouble ccos(cdouble z);
cfloat ccosf(cfloat z);
creal ccosl(creal z);
cdouble csin(cdouble z);
cfloat csinf(cfloat z);
creal csinl(creal z);
cdouble ctan(cdouble z);
cfloat ctanf(cfloat z);
creal ctanl(creal z);
cdouble cacosh(cdouble z);
cfloat cacoshf(cfloat z);
creal cacoshl(creal z);
cdouble casinh(cdouble z);
cfloat casinhf(cfloat z);
creal casinhl(creal z);
cdouble catanh(cdouble z);
cfloat catanhf(cfloat z);
creal catanhl(creal z);
cdouble ccosh(cdouble z);
cfloat ccoshf(cfloat z);
creal ccoshl(creal z);
cdouble csinh(cdouble z);
cfloat csinhf(cfloat z);
creal csinhl(creal z);
cdouble ctanh(cdouble z);
cfloat ctanhf(cfloat z);
creal ctanhl(creal z);
cdouble cexp(cdouble z);
cfloat cexpf(cfloat z);
creal cexpl(creal z);
cdouble clog(cdouble z);
cfloat clogf(cfloat z);
creal clogl(creal z);
double cabs(cdouble z);
float cabsf(cfloat z);
real cabsl(creal z);
cdouble cpow(cdouble x, cdouble y);
cfloat cpowf(cfloat x, cfloat y);
creal cpowl(creal x, creal y);
cdouble csqrt(cdouble z);
cfloat csqrtf(cfloat z);
creal csqrtl(creal z);
double carg(cdouble z);
float cargf(cfloat z);
real cargl(creal z);
pragma(inline, true) double cimag(cdouble z) { return z.im; }
pragma(inline, true) float cimagf(cfloat z) { return z.im; }
pragma(inline, true) real cimagl(creal z) { return z.im; }
cdouble conj(cdouble z);
cfloat conjf(cfloat z);
creal conjl(creal z);
cdouble cproj(cdouble z);
cfloat cprojf(cfloat z);
creal cprojl(creal z);
// Note: `creal` is a keyword in D and so this function is inaccessible, use `creald` instead
//pragma(inline, true) double creal(cdouble z) { return z.re; }
pragma(inline, true) double creald(cdouble z) { return z.re; }
pragma(inline, true) float crealf(cfloat z) { return z.re; }
pragma(inline, true) real creall(creal z) { return z.re; }