[Issue 3429] Core dump on passing template literal to member function.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 21 03:24:10 PDT 2009


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #2 from Don <clugdbug at yahoo.com.au> 2009-10-21 03:24:08 PDT ---
This one is trivial. 
PATCH: template.c, line 4139. d needs to be initialized BEFORE the goto,
because it is used in the error message.

        Declaration *d = NULL;
        TemplateDeclaration *td = sa->isTemplateDeclaration();
+        d = sa->isDeclaration();
        if (td && td->literal)
        {
        goto L2;
        }
-        d = sa->isDeclaration();
        if (d && !d->isDataseg() &&
#if DMDV2
        !(d->storage_class & STCmanifest) &&
#endif
        (!d->isFuncDeclaration() || d->isFuncDeclaration()->isNested()) &&
        !isTemplateMixin())
        {        
         L2:


Actually, I'm not sure why this goto is even there. It could just be a clause
in the 'if' statement!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list