runtime vararg can easily be broken

davidl davidl at nospam.org
Fri Jun 12 23:49:55 PDT 2009


在 Sat, 13 Jun 2009 02:17:03 +0800,Daniel Keep  
<daniel.keep.lists at gmail.com> 写道:

>
>
> davidl wrote:
>> The runtime vararg push into stack with align of 4, however programmer
>> might neglect this easily and cause problem.
>>
>> ...
>>
>
> That's because you're not supposed to do that.
>
> std.stdarg

Then you probably want to accuse the spec examples of vararg functions.  
Also runtime vararg code shouldn't care anything about the alignment of  
stack for the sake of performance improvement.


-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list