The old error message (`return expression expected`) ignored the
possibility that `void` and `noreturn` expressions are moved into `e0`.
This caused misleading error messages when errors are detected after
the move, claiming that the expression found in the source code is
missing.
Small improvement to #13135 because this is more likely to happen for
`noreturn` functions.
FreeBSD has had fmodl since 8.0 (2008)
DragonFly BSD has had fmodl since 4.1 (2013)
The special casing to use fmod instead of fmodl can be removed.
Fix Issue 22461 - OpenBSD: Use fmodl
The GitHub workflow is setting LD_LIBRARY_PATH to the host dmd library
folder with libphobos2.so. The tests are built using a new phobos. They
select the library path using -L-rpath, which sets DT_RUNPATH on the
binary, but LD_LIBRARY_PATH has priority over DT_RUNPATH.
For tests/dshell/dll_cxx.d this caused a link failure, because a new
symbol from phobos was not found in the older phobos.
Reseting LD_LIBRARY_PATH while running the tests makes sure, that the
new phobos is used.
CTFE evaluation is single threaded only, hence it's safe to discard the
`shared` qualifier in a reinterpreting cast.
This change allows `-checkaction=context` to use a reinterpreting cast
for compile and runtime - which removes the problematic workaround
that caused the regression.
* fix Issue 22403 - importC: Error: cannot pass argument '0' of type 'int' to parameter 'const(char)*'
* fix Issue 22404 - importC: Error: cannot pass argument 'ENUMMEM' of type 'int' to parameter '__tag2'
Replaces the function call with the evaluation of the arguments up to
the first `noreturn` parameter. The remaining arguments / the function
call will never be executed anyways and the backend cannot handle
noreturn parameters.
`alignmember` assumes that every type with default alignment has a size
greater than zero - which obviously does not apply for `noreturn`.
A `noreturn` field with default alignment does not affect the layout of
the aggregate because `noreturn.sizeof = noreturn.alignof = 0`. Hence
skip the `alignmember` call unless a custom alignment was requested.
... return type.
Return type inference used to commit to `noreturn` when encountering
a return statement producing a `noreturn` value. This was problematic
when the function contained subsequent `void` returns, raising an error
regarding missmatched function type inference even though `void` and
`noreturn` are compatible (neither produce an actual value).
This patch changes the code to let `noreturn` be overriden by `void`.