Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6361587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:47:48+00:00 2026-05-24T23:47:48+00:00

Why is the /Wp64 flag in Visual C++ deprecated ? cl : Command line

  • 0

Why is the /Wp64 flag in Visual C++ deprecated?

cl : Command line warning D9035 :
option ‘Wp64’ has been deprecated and will be removed in a future release

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:47:49+00:00Added an answer on May 24, 2026 at 11:47 pm

    I think that/Wp64 is deprecated mainly because compiling for a 64-bit target will catch the kinds of errors it was designed to catch (/Wp64 is only valid in 32-bit compiles). The option was added back when 64-bit targets were emerging to help people migrate their programs to 64-bit and help detect code that wasn’t ’64-bit clean’.

    Here’s an example of the kinds of problems with /Wp64 that Microsoft just isn’t interested in fixing – probably rightly so (from http://connect.microsoft.com/VisualStudio/feedback/details/502281/std-vector-incompatible-with-wp64-compiler-option):

    Actually, the STL isn’t intentionally incompatible with /Wp64, nor is
    it completely and unconditionally incompatible with /Wp64. The
    underlying problem is that /Wp64 interacts extremely badly with
    templates, because __w64 isn’t fully integrated into the type system.
    Therefore, if vector<unsigned int> is instantiated before vector<__w64 unsigned int>, then both of them will behave like vector<unsigned int>, and vice versa. On x86, SOCKET is a typedef for __w64 unsigned int. It’s not obvious, but vector<unsigned int> is being instantiated
    before your vector<SOCKET>, since vector<bool> is backed (in our
    implementation) by vector<unsigned int>.

    Previously (in VC9 and earlier), this bad interaction between /Wp64
    and templates caused spurious warnings. In VC10, however, changes to
    the STL have made this worse. Now, when vector::push_back() is given
    an element of the vector itself, it figures out the element’s index
    before doing other work. That index is obtained by subtracting the
    element’s address from the beginning of the vector. In your repro,
    this involves subtracting const SOCKET * - unsigned int *. (The latter
    is unsigned int * and not SOCKET * due to the previously described
    bug.) This /should/ trigger a spurious warning, saying “I’m
    subtracting pointers that point to the same type on x86, but to
    different types on x64”. However, there is a SECOND bug here, where
    /Wp64 gets really confused and thinks this is a hard error (while
    adding constness to the unsigned int *).

    We agree that this bogus error message is confusing. However, since
    it’s preceded by an un-silenceable command line deprecation warning
    D9035, we believe that that should be sufficient. D9035 already says
    that /Wp64 shouldn’t be used (although it doesn’t go on to say “this
    option is super duper buggy, and completely unnecessary now”).

    In the STL, we could #error when /Wp64 is used. However, that would
    break customers who are still compiling with /Wp64 (despite the
    deprecation warning) and aren’t triggering this bogus error. The STL
    could also emit a warning, but the compiler is already emitting D9035.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Visual Studio and Windows as a development platform, and I'm having
When the Boost library/headers is used with VC++ 9 compilers (Visual C++ 2008 Express
This is the code I have: HWND WebformCreate(HWND hParent, UINT id) { return CreateWindowEx(0,
I'm using Detours library from microsoft, and I was using the 32bit version (which
I've got the following lines of code: p_diffuse = ShaderProperty<Vector4>(Vector4(1,1,1,1)); addProperty(&p_diffuse, diffuse); p_shininess =
I've got an unmanaged C++ dll which is being called from a C# app,
I got the Sample Project for video capture from video Camera. I was trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.