www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



D.gnu - [Issue 2102] New: Invalid code generated with nested delegates

↑ ↓ ← d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2102

           Summary: Invalid code generated with nested delegates
           Product: DGCC aka GDC
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: jeffdavey submersion.com


Currently on Ubuntu 8.04 with the packaged GDC 4.2.3, given this code:

import tango.io.Stdout;
void main()
{
    char[] blah;

    void myFunc()
    {   
        void myOtherFunc()
        {
            blah ~= "Hello there";
            Stdout(blah).newline;
        }
        myOtherFunc;
    }   
    myFunc;
}

It segfaults when trying to access "blah" in the myOtherFunc delegate.

Using a separate Ubuntu 7.10 box with GDC 4.1, it works as expected (I see
"Hello There").


-- 
May 12 2008
↑ ↓ → d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2102





------- Comment #1 from bugzilla digitalmars.com  2008-06-16 18:04 -------
This does work correctly with dmd.


-- 
Jun 16 2008