www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1187] New: Segfault with syntax error in two-level mixin.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1187

           Summary: Segfault with syntax error in two-level mixin.
           Product: D
           Version: 1.013
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: clugdbug yahoo.com.au


Several kinds of syntax error seem to do it.
-----------
void a(){
    mixin(`mixin`);
}
------------
and the next one doesn't segfault, but has no line number (identifier expected,
not EOF):

mixin(`mixin`);


-- 
Apr 24 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1187


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All





Added to DStress as
http://dstress.kuehne.cn/nocompile/m/mixin_36_A.d
http://dstress.kuehne.cn/nocompile/m/mixin_36_B.d


-- 
Apr 27 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1187


davidl 126.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |davidl 126.com





a patch:
expression.c:4576
DeclarationExp::DeclarationExp(Loc loc, Dsymbol *declaration)
        : Expression(loc, TOKdeclaration, sizeof(DeclarationExp))
{
    assert(declaration);                //no null declaration allowed
    this->declaration = declaration;
}
parse.c:2550
            }
            Dsymbol *d = parseMixin();
            if (d)
                s = new DeclarationStatement(loc, d);
            break;


-- 
Nov 09 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1187


clugdbug yahoo.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD1.032


-- 
Jul 09 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1187






Fixed dmd 1.032 and 2.016


-- 
Jul 09 2008