On Fri, Nov 10, 2017 at 4:25 PM, R0b0t1 <r03...@gmail.com> wrote:
> Hello,
>

>
> I'm having trouble finding the article again, but these functions look
> very similar to Microsoft's extensions to the C standard. There is a
> good case to be made that they are counterproductive.

Yes, it looks like it. No wonder, if it's MS inspired. But what I care
about is the fact that it's not optimized away, not the boundaries
checking stuff. It's hard to believe that it is practically impossible
to clean up a buffer, unless one is willing to forego all
optimizations:

http://www.daemonology.net/blog/2014-09-04-how-to-zero-a-buffer.html


>> Of course, what would really solve the optimize-into-oblivion problem
>> is a pragma that when invoked on a particular block of code (maybe
>> only a function definition) would tell the compiler to do what the
>> programmer says rather than viewing a function as a kind of black box.
>>
>
> This would probably be useful. It may be wise to reimplement important
> functionality.
>
No idea how difficult it would be to implement, of course. There might
even exist a C keyword for that. After all, the C standard states the
"as-if" rule, it might as well establish such an exception.

Cheers

Jorge

Reply via email to