Search

VC++10 crashing on basic BOOST_TYPEOF usage by Georg Fritzsche

Closed
as Fixed Help for as Fixed

2
0
Sign in
to vote
Type: Bug
ID: 718621
Opened: 1/14/2012 4:27:47 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
0
User(s) can reproduce this bug
Visual C++ 2010 is crashing on basic BOOST_TYPEOF usage:

#include <boost/typeof/typeof.hpp>
struct A { int m; };
int main() {
    BOOST_TYPEOF(A::m);
}

This is with:
* Boost 1.47
* Visual Studio 10.0.40219.1 SP1Rel
Details (expand)

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

Visual Studio 2010 SP1

Steps to reproduce

Build the following code:

#include <boost/typeof/typeof.hpp>
struct A { int m; };
int main() {
    BOOST_TYPEOF(A::m);
}

Product Language

English

Operating System

Windows 7

Operating System Language

German

Actual results

Compiler crash:

1>test.cpp(4): fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'msc1.cpp', line 1420)
1> To work around this problem, try simplifying or changing the program near the locations listed above.

Expected results

No crash.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 3/21/2012 at 3:50 PM
Hello,

Thank you for reporting this bug. This indeed was a bug in our compiler where it was crashing when trying to give an error for illegal access of a non-static member of a class. We've fixed the bug in the next version of the product. In the meantime, while you're using VS2010SP1 please fix your code here:
BOOST_TYPEOF(A().m);

Thanks,
Ulzii Luvsanbat
Visual C++ Team
Posted by MS-Moderator07 [Feedback Moderator] on 1/15/2012 at 8:36 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by MS-Moderator01 on 1/14/2012 at 4:42 PM
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.