Friendly-C

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 28 02:12:15 PDT 2014


On Thursday, 28 August 2014 at 07:36:28 UTC, bearophile wrote:
> Found through Reddit. A nice incomplete list that specifies a 
> "friendly C" that replaces many occurrences of "X has undefined 
> behavior" with "X results in an unspecified value":
>
> http://blog.regehr.org/archives/1180
>
> But I agree with one comment:
>
>>memcpy and memmove ought to remain distinct, but I think that 
>>an overlapping memcpy ought to result in unspecified garbage 
>>being written rather than undefined behavior.<
>
> Bye,
> bearophile

It forces all the load to potentially have side effects, which, 
in turn, limit dramatically what the optimizer can do.


More information about the Digitalmars-d mailing list