Home Dashboard Directory Help
Search

C2466 emitted twice for the same construct by Dmitry Me


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 688107
Opened: 9/13/2011 5:01:04 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

This behavior is observed in 10.0.40219.1 SP1Rel

I have this code:

int _tmain(int argc, _TCHAR* argv[])
{
    char source[0] = {};
    return 0;
}

I compile it and get this output:

1>------ Build started: Project: AnalyzeTest, Configuration: Release Win32 ------
1> AnalyzeTest.cpp
1>AnalyzeTest.cpp(56): error C2466: cannot allocate an array of constant size 0
1>AnalyzeTest.cpp(56): error C2466: cannot allocate an array of constant size 0
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Here C2466 is output twice. This is weird - it should only be emitted once.
Details
Sign in to post a comment.
Posted by Microsoft on 9/14/2011 at 11:06 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 9/13/2011 at 8:07 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 9/13/2011 at 5:42 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.