dip1000 and preview in combine to cause extra safety errors

Ali Çehreli acehreli at yahoo.com
Thu Jun 9 01:07:01 UTC 2022


OOn 6/8/22 17:54, Timon Gehr wrote:
 > On 09.06.22 02:44, Ali Çehreli wrote:
 >> The society trusts C libraries, so do we.
 >
 > free(cast(void*)0xDEADBEEF)
 >
 > Seems legit.

I don't get the point. The society uses C libraries in many places. I 
assume many important libraries like libssh are written in C.

If your point was about my proposal, I meant only @trusted code would be 
able to call a C library. So, if your expression above was in D code, 
then the compiler would reject it (@trusted-by-default but @trusted is 
checked). The programmer would have to mark it as @system.

Ali



More information about the Digitalmars-d mailing list