Search

VS Stop Working in Win7 by 奋斗者2011

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 698459
Opened: 11/2/2011 2:52:45 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
0
User(s) can reproduce this bug
#include <iostream>
#include <conio.h>
#include <list>

using namespace std;

template<typename T>
class A
{
public:
    class
    {
    public:
        virtual void test(){}
        int b;
        int c;
    };
};

int main()
{
    A<int> a;
    a.b = 0;
    cout<<sizeof(A<int>)<<endl;
    getch();
    return 0;
}

When I build this code, VS Stop working!
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling version

Visual Studio 2010

Steps to reproduce

Complie the following code:
#include <iostream>
#include <conio.h>
#include <list>

using namespace std;

template<typename T>
class A
{
public:
    class
    {
    public:
        virtual void test(){}
        int b;
        int c;
    };
};

int main()
{
    A<int> a;
    a.b = 0;
    cout<<sizeof(A<int>)<<endl;
    getch();
    return 0;
}

Product Language

English

Operating System

Windows 7

Operating System Language

Chinese (Simplified)

Actual results

Microsoft C/C++ Optimizing Compiler 已停止工作

Expected results

Report a error in that code.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 11/15/2011 at 10:13 AM
Hi:
    A fix for this issue has been checked into the compiler sources. The fix should show up in the next release of Visual C++.

Xiang Fan
Visual C++ Team
Posted by MS-Moderator10 [Feedback Moderator] on 11/2/2011 at 10:13 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 11/2/2011 at 3:47 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.