Search

CL crashes while compiling specific line (see description) by Grigory Cherny

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 676037
Opened: 6/19/2011 9:42:14 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
1
User(s) can reproduce this bug
CL craches for the code below (with not defined 'MIN' macro). After defining 'MIN' macro (e.g. after uncommenting presented line) CL successfully compiles this code.


//------------------------------------------------------
//#define MIN(a,b) ((a)>(b)?(b):(a))

size_t Calc(unsigned a1, unsigned a2)
{
    return size_t(MIN(a1, a2) - a1);

}
//------------------------------------------------------
Details (expand)

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

Visual Studio 2010

Steps to reproduce

Attached project can be used,

or:
1. Create VC++ project (e.g. static library)
2. Insert code cited in Description form above to 'cpp' file
3. Try compile project

Product Language

English

Operating System

Windows 7

Operating System Language

Russian

Actual results

CL crashes.

Expected results

CL does not crash.
File Attachments
File Name Submitted By Submitted On File Size  
cl_test.zip 6/19/2011 4 KB
Sign in to post a comment.
Posted by Microsoft on 6/22/2011 at 11: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-Moderator07 [Feedback Moderator] on 6/20/2011 at 2:14 AM
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 6/19/2011 at 9:48 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.