Thread: MS is back with more deprecations...

  1. #1
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879

    MS is back with more deprecations...

    MSVC 2005 Beta 2 has just introduced a whole set of additional nonstandard deprecations, on top of the 'deprecations' made to the C standard library in Beta 1 due to perceived security risks, except to the STL this time.

    In particular, I got hammered by a pile of warnings about std::remove(), and I can't find my real errors anymore. Anyway, does anyone know of any security vulnerabilities associated with std::remove(), that don't involve misuse? Because I'm just a little sceptical about MS's recent pushes for changes to the C/C++ standards, and it's more than a little annoying when perfectly healthy code generates an entire output-window full of crazy un-disableable 3-warning deprecation combos, which also happen to list all the template arguments in an obscenely un-compact manner and obscure any useful information.
    [end rant]
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    You can either disable the warning with a pragma or use define _CRT_SECURE_NO_DEPRECATE in your project settings.

    I don't know anything specifically in remove but I would not be suprised if something was wrong in there. Maybe I'll take a look later. If you google you can get to some MSDN pages that give you lots of exploit examples.

    Here is a good link to start at:

    http://msdn2.microsoft.com/library/8ef0s5kh.aspx
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    OK thanks, I'll take a look (the define worked too, was looking for that some time ago - except for the STL ones, it's _SCL_SECURE_NO_DEPRECATE, not sure exactly why it's SCL rather than STL, but the deprecation code used SCL and that's what worked).

    **EDIT**
    As far as I can see, most if not all of the 'problems' with the CRT functions can be prevented with minimal effort on the part of the programmer (i.e. eliminating typos and logic errors, as should be done anyway). Not sure about the filesystem stuff though, don't know much about it.
    Last edited by Hunter2; 07-03-2005 at 07:42 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Connect to MS SQL DB
    By Kevin_Meziere in forum C Programming
    Replies: 7
    Last Post: 07-13-2006, 02:10 PM
  2. Some woman back ended my car today, and back hurts
    By Terrance in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 08-20-2003, 12:42 AM
  3. Sun win over Microsoft
    By face_master in forum A Brief History of Cprogramming.com
    Replies: 30
    Last Post: 01-01-2003, 12:41 PM
  4. why wont MS Visual C++ understand my #include <stdlib.h>
    By Master_Rondal in forum C Programming
    Replies: 5
    Last Post: 10-15-2002, 04:36 PM
  5. MS VC++ cin.eof ignoring first ^Z. What up?
    By dstocks in forum C++ Programming
    Replies: 1
    Last Post: 01-12-2002, 05:16 PM