Error: llroundl cannot be interpreted at compile time, because it has no available source code
mw
mingwu at gmail.com
Mon Jun 8 19:34:41 UTC 2020
On Monday, 8 June 2020 at 19:05:45 UTC, Steven Schveighoffer
wrote:
> On 6/8/20 2:53 PM, mw wrote:
>> And with a symbol-to-c-func table, it should be able to just
>> call that C func.
>
> Consider that the libc available to the compiler might not be
> the same as the libc for the target (e.g. cross compilation).
>
> Not just that, but this opens the compiler up to a huge hole of
> unpredictability and security.
I head that.
But, can we take a pragmatic approach, not the "all-or-none"
approach as I talked about in the other MI thread:
(https://forum.dlang.org/post/lsnhqdoyatkzbzqbsrbb@forum.dlang.org)
We can have an approved list of C funcs that allowed to be called
during CTFE? e.g. math funcs about numbers, but not network or
string C funcs.
Most people define static const for some numerical values, allow
C math func at CTFE may solve a large part of the problems
(80-90%? just my guess).
More information about the Digitalmars-d-learn
mailing list