Search

In C code, some macros will disturb Visual Studio's function list drop down menu by kikoogay

Closed
as Deferred Help for as Deferred

1
0
Sign in
to vote
Type: Bug
ID: 773384
Opened: 12/4/2012 12:14:51 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
Using Visual Studio 2012 in a C project (should work with C++ too I assume), using a macro that accepts parameters and which is followed by braces {} makes the IDE behave in strange ways.

Firstly, the macro name along with its parameters appear in the function list drop down menu of VS. Secondly, the function the macro call was part of does not appear anymore in said menu.

This happens a lot when using macros to replace "for" or "while" calls, such as the one found in uthash.h (http://uthash.sourceforge.net/) for iterating a hash table.
Details (expand)

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

Visual Studio 2012

Steps to reproduce

1. Create a new empty C++ solution in Visual Studio.
2. Add to the solution a main.c file containing the following code :

#define FORMACRO() for( ; ;)

int main()
{
    FORMACRO()
    {
    }
    return 0;
}

3. Open the function list drop down menu of Visual Studio (usually located in the upper right corner in the default configuration)

Product Language

English

Operating System

Windows 7 SP1

Operating System Language

English

Actual results

The menu contains a single entry "FORMACRO()" which is however not a function.

Expected results

The menu should contain a single entry "main()". Commenting the line "FORMACRO()" (line 5) brings back the expected function list.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 2/13/2013 at 3:53 PM
Hi kikoogay,

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.

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 12/4/2012 at 1:25 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 12/4/2012 at 12: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.