Search

C2143 emitted twice for the same construct by Dmitry Me

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 688443
Opened: 9/14/2011 11:08:10 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
0
User(s) can reproduce this bug
This behavior is observed in cl.exe version 16.00.40219.1

I compile this code:

int _tmain(int argc, _TCHAR* argv[])
{
    for( int i = 0; i <> 5; i++ );
    return 0;
}

and get this output:

1> AnalyzeTest.cpp
1>AnalyzeTest.cpp(65): error C2059: syntax error : '>'
1>AnalyzeTest.cpp(65): error C2143: syntax error : missing ';' before ')'
1>AnalyzeTest.cpp(65): error C2143: syntax error : missing ';' before ')'

Here C2143 is emitted twice for the same construct. It should only be emitted once.
Details (expand)

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

Visual Studio 2010 SP1

Steps to reproduce

Compile the code above.

Product Language

English

Operating System

Windows XP

Operating System Language

English

Actual results

C2143 is emitted twice.

Expected results

C2143 should be emitted once.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 9/16/2011 at 10:02 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-Moderator09 [Feedback Moderator] on 9/15/2011 at 2:45 AM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 9/14/2011 at 11: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.