Search

MSVC allows pointers in constructor declarator by Ivan Sorokin

Closed
as Deferred Help for as Deferred

1
0
Sign in
to vote
Type: Bug
ID: 777387
Opened: 1/24/2013 7:03:26 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
MSVC (incorrectly) accepts this code and treats x as constructor:

struct y
{};

struct x
{
    (*x)(y)
    {}
};
Details (expand)

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

Visual Studio 2012

Steps to reproduce

struct y
{};

struct x
{
    (*x)(y)
    {}
};

Product Language

English

Operating System

Windows 8

Operating System Language

English

Actual results

MSVC compiles this code

Expected results

Error message
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 2/12/2013 at 1:52 PM
Hi Ivan,

Thank you for taking the time to provide your feedback. After reviewing your reported issue, in the context of all the issues reported to us, we have decided not to take any action on this feedback at this time. We will re-consider our decision for a future release. In the meantime, just avoid writing code that exploits this parser quirk.

If this issue is severe, causing critical business situations or blocking your product development or deployment, please go to http://support.microsoft.com or call 1-800-MICROSOFT for assistance.
For Microsoft premier customers, please contact your administrator, your Technical Account Manager, or your Microsoft premier account representative.

Thanks,
Karl Niu
VC++ Team
Posted by Microsoft on 1/24/2013 at 7:29 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 Microsoft on 1/24/2013 at 7:50 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.