Home Dashboard Directory Help

Enumeration with negative values are popping C4341 warnings by webJose


 as Fixed Help for as Fixed

Sign in
to vote
Type: Bug
ID: 674442
Opened: 6/7/2011 7:59:03 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
User(s) can reproduce this bug


The following enum generates one warning per enumeration value:

typedef enum _StdTaskDialogIcons : short int
    TDIconWarning = -1,
    TDIconError = -2,
    TDIconInformation = -3,
    TDIconShield = -4
} StdTaskDialogIcons;

According to several people, the enumeration is OK and should not pop the said warnings. See http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/fc45de2d-e516-4162-9ec4-de5fddc6681f and http://www.cplusplus.com/forum/general/44367/ for details on it from other language experts.

FYI: I found this problem in Visual Studio 2008, but I was not given the option to post this bug for any other version of Visual Studio other than 2010.
Sign in to post a comment.
Posted by Microsoft on 7/20/2011 at 5:15 PM
    A fix for this issue has been checked into the compiler sources. The fix should show up in the next release of Visual C++.
    This is a redundant warning. You can safely suppress it.

Xiang Fan
Visual C++ Team
Posted by MS-Moderator07 [Feedback Moderator] on 6/7/2011 at 10:13 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 6/7/2011 at 8:49 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.