www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11851] New: Memory Access Violation Exception on a postfix addition operation.

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

           Summary: Memory Access Violation Exception on a postfix
                    addition operation.
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: VisualD
        AssignedTo: nobody puremagic.com
        ReportedBy: davidnia1 gmail.com



// The following code throws an access violation exception:
// I am using D compiler version 2.64.2
// Visual Studio 2010 Ultimate
// Visual D

module test;

class Foo {
    public static ulong next = 0;

    public static ulong getNext() {
        return next++;
    }
}

void main() {
    Foo.getNext();
}

/*
The next++ is the culprit.
Using ++next does not throw an exception.
*/

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 30 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11851




The exception is not thrown when compiling and executing from the command line.
 The error only happens when compiling and executing in Visual Studio using the
Visual D tool.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 30 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11851


Rainer Schuetze <r.sagitario gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario gmx.de



PST ---
I cannot reproduce here. I guess it will have to do with the options passed to
dmd or the linker. Could you please post the build command file (*.cmd in the
output directory)?

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