[Issue 2744] wrong init tocbuffer of forstatement

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 20 05:57:55 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2744





------- Comment #2 from davidl at 126.com  2009-03-20 07:57 -------
simple testcase:
template T(t){
        void func(){
                        for ( auto cmp = t.predicate.data_str.ptr,
                            cmpend = cmp + t.predicate.data_str.length;
                            cmp < cmpend; ++cmp )
                        {

                        }
        }
}

void VarDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
{
        if(!hgs->FLinit.decl)
        {
    if (storage_class & STCconst)
        buf->writestring("const ");
    if (storage_class & STCstatic)
        buf->writestring("static ");
    if (storage_class & STCauto)
        buf->writestring("auto ");
        }

last patch doesn't solve the auto storage class issue.


-- 



More information about the Digitalmars-d-bugs mailing list