Rationale for accepting DIP 1028 as is

Bruce Carneal bcarneal at gmail.com
Wed May 27 06:20:26 UTC 2020


On Wednesday, 27 May 2020 at 05:49:49 UTC, Walter Bright wrote:
> On 5/26/2020 9:31 AM, Bruce Carneal wrote:
>> Currently a machine checked @safe function calling an 
>> unannotated extern C routine will error out during 
>> compilation. This is great as the C routine was not machine 
>> checked, and generally can not be checked.  Post 1028, IIUC, 
>> the compilation will go through without complaint.  This seems 
>> quite clear.  What am I missing?
>
> Nothing at all.
>
> But I doubt there is much legacy non-compiling code around.

The intent of my above was to illustrate the difference between 
pre 1028 compiler behavior and post 1028 compiler behavior.  I'm 
not at all concerned with legacy non-compiling code of this 
nature.  I am concerned about the change in compiler behavior.

As you've confirmed, post 1028 the compiler will accept an @safe 
routine calling in to an un-annotated extern C function without 
complaint.

Andre, I hope this is clear enough for you.




More information about the Digitalmars-d-announce mailing list