Home Dashboard Directory Help
Search

Including stdint after intsafe generates warnings by Olaf vander Spek


Status: 

Closed
 as Fixed Help for as Fixed


16
0
Sign in
to vote
Type: Bug
ID: 621653
Opened: 11/13/2010 9:02:13 AM
Access Restriction: Public
3
Workaround(s)
view
16
User(s) can reproduce this bug

Description

Including stdint after intsafe generates warnings
Details
Sign in to post a comment.
Posted by Chuck Walbourn - MSFT on 2/27/2013 at 2:55 PM
This is fixed in VS 2012.
Posted by Andrew Bushnell [Autodesk] on 7/7/2011 at 12:49 PM
When you say "Next major release" do you mean a service pack on top of VC2010 or it would be more than likely a version past 2010 (say 2012).
Posted by Microsoft on 2/8/2011 at 8:26 AM
Hello,

Thanks for the report. This issue has been fixed in the VC++ header files for the next major release of Visual Studio.

Pat Brenner
Visual C++ Libraries Development
Posted by Microsoft on 12/28/2010 at 11:52 AM
Thanks for reporting this. We apparently have a definition of these both in the VC headers and in the Windows SDK. We'll discuss where the appropriate place to fix is and will look into fixing it in a future release.

Alex Thaman
Senior Test Lead
Visual C++ Team
Posted by Microsoft on 11/14/2010 at 6:32 PM
Thank you for reporting the issue.
We are routing 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 11/13/2010 at 9:22 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.
Posted by John Crockett on 12/5/2011 at 2:06 AM
in stdafx.h, insert

#define _INTSAFE_H_INCLUDED_
#include <stdint.h>

as the first include
Posted by Olaf vander Spek on 1/14/2011 at 4:25 AM
That work around is wrong. You should do push, disable, pop, not push, disable, push default.
Posted by Maxime C on 12/30/2010 at 7:27 AM
It also happen in the other order, if you include intsafe after stdint.

Quick and dirty, but no other choice for now as I know if you considere warning as error in your project.
On your top headers, include directly this both header files and disable the warning C4005 the time of the declaration.


#ifdef _MSC_VER // This check can be removed if you only build for Windows
#pragma warning (push)
#pragma warning (disable : 4005)
#include <intsafe.h>
#include <stdint.h>
#pragma warning (push)
#pragma warning (default : 4005)
#endif