Re: A code fix for MSVC warning C4267 (64-bit compatibility warning,e.g. Boost Spirit)

Discussion in 'C++' started by Pete Becker, Feb 10, 2005.

  1. Pete Becker

    Pete Becker Guest

    Alf P. Steinbach wrote:
    > Microsoft Visual C++ warning C4267 (the number is not a typo) can occur e.g.
    > when compiling Boost Spirit, or when doing
    >
    > std::size_t x = 0;
    > std::cout << x;
    >
    > when compiled with 64-bit compatibility warnings enabled.
    >
    > One fix is to turn off conversion warnings, another _may be_ as follows --
    > I'm wondering whether someone could test this on a 64-bit machine, or have
    > other comments:
    >


    That's an awful lot of code just to avoid a stupid warning. The code as
    originally written is well defined, clear, and unambiguous. The code as
    rewritten is impenetrable. Complain to Microsoft.

    --

    Pete Becker
    Dinkumware, Ltd. (http://www.dinkumware.com)
     
    Pete Becker, Feb 10, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xah Lee
    Replies:
    22
    Views:
    1,154
    Tim Roberts
    Mar 21, 2006
  2. Ingo Nolden
    Replies:
    1
    Views:
    480
    Rob Williscroft
    Jul 14, 2004
  3. Xah Lee
    Replies:
    23
    Views:
    1,104
    Tim Roberts
    Mar 21, 2006
  4. B. Williams

    warning C4267 and warning C4996

    B. Williams, Oct 26, 2006, in forum: C++
    Replies:
    17
    Views:
    2,649
  5. Xah Lee
    Replies:
    21
    Views:
    828
    Tim Roberts
    Mar 21, 2006
Loading...

Share This Page