473,245 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,245 software developers and data experts.

VC8 and C4996

So we finally switched a big project to VC8. Good. However,
now I can't see any compiler messages anymore, because they
are burried under gazillions of messages that some C std
functions are declared deprecated. Bad. This code is compiled
on several platforms, so changing it is out of question. Also,
there's several 100kLOC 3rd-party code that we won't touch.

So I've ploughed through the help and played with the macros.
But, despite the fact that the help seems to say that defining
'_CRT_SECURE_NO_DEPRECATE' would disable the warnings, somehow
it doesn't. Did I read the help wrong or is it that I did
something stupid? I am suspicious regarding the latter, but,
if I put a
#define _SECURE_SCL 0
at into the same header, all those warnings disappear. However,
I suspect this also turns off the secure overloads, which we
actually would like to use.
I thought that this
#define _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1
should do the trick, but I still get
iosfwd(582) : warning C4996: 'std::_Traits_helper::copy_s' was declared deprecated
using this.
Is this supposed to happen? Or am I just doing something stupid?

Please enlighten me.

Thanks,

Schobi
P.S.: Here's something I need to get off my chest regarding this:
I have been lobbying for making C++ std compliant project
settings the default at least since when VC7.1 was in beta.
I was told that these things take time, because you don't
want to break your customer's code. (I am glad they are
the default now, BTW.) And now you go ahead and make such
a mess. We get 40,000 new warnings for this project! How
are we supposed to look at this mess? For heaven's sake,
some shops treat warnings as errors!
To say the least: This was a stupid idea.

--
Sp******@gmx.de is never read
I'm Schobi at suespammers dot org

"The sarcasm is mightier than the sword."
Eric Jarvis
May 18 '06 #1
3 3436
Hendrik Schober wrote:
I thought that this
#define _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1
should do the trick, but I still get
iosfwd(582) : warning C4996: 'std::_Traits_helper::copy_s' was declared deprecated
using this.


Yes I have the same problem. Try to add _SCL_SECURE_NO_DEPRECATE, as
Igor Tandetnik recommended on microsoft.public.vc.language just hours
ago to a different poster. Please let us know if that helped.

Tom
May 18 '06 #2
Tamas Demjen <td*****@yahoo.com> wrote:
Hendrik Schober wrote:
I thought that this
#define _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1
should do the trick, but I still get
iosfwd(582) : warning C4996: 'std::_Traits_helper::copy_s' was declared deprecated
using this.
Yes I have the same problem. Try to add _SCL_SECURE_NO_DEPRECATE [...]


Indeed, this seems to help. Thanks a lot!
(I am sure I failed to see that '_CRT_SECURE_NO_DEPRECATE'
and '_SCL_SECURE_NO_DEPRECATE' are two different defines
when I stumbled across them somewhere in the help...)
Tom


Schobi

--
Sp******@gmx.de is never read
I'm Schobi at suespammers dot org

"The sarcasm is mightier than the sword."
Eric Jarvis
May 18 '06 #3
Hendrik Schober <Sp******@gmx.de> wrote:
Tamas Demjen <td*****@yahoo.com> wrote:
Hendrik Schober wrote:
I thought that this
#define _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1
should do the trick, but I still get
iosfwd(582) : warning C4996: 'std::_Traits_helper::copy_s' was declared deprecated
using this.


Yes I have the same problem. Try to add _SCL_SECURE_NO_DEPRECATE [...]


Indeed, this seems to help. Thanks a lot!
(I am sure I failed to see that '_CRT_SECURE_NO_DEPRECATE'
and '_SCL_SECURE_NO_DEPRECATE' are two different defines
when I stumbled across them somewhere in the help...)


I just added '_CRT_NONSTDC_NO_DEPRECATE' to the mix
which got us rid of another few warnings that came
from some 3rd-party headers.
I'm actually down to about 10,000 warnings now, most
of which come from 3rd-party code. A typical edit-
compile scenario now finds mostly sensible warnings.
Yikes!

Schobi

--
Sp******@gmx.de is never read
I'm Schobi at suespammers dot org

"The sarcasm is mightier than the sword."
Eric Jarvis
May 22 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

45
by: Matt Parkins | last post by:
Hi, (I realise this probably isn't precisely the right group for this - could someone direct me to the appropriate group to post this question? - thanks !) I'm using Visual C++ 2005 Express...
2
by: AMT2K5 | last post by:
Hello. When I compile my program I recieve lots and lots of the following message which I am trying to decipher. "xxx was declared deprecated". What exactly does that mean?
7
by: Olaf Baeyens | last post by:
I am testing VC++ 2005 and I get this warning: "warning C4996: 'strncpy' was declared deprecated" Does that mean that they might be phased out in VC++ 2006 or higher? Or does an alternative...
4
by: bonk | last post by:
This article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vcconconvertingmanagedextensionsforcprojectsfrompureintermediatelanguagetomixedmode.asp seems to be...
17
by: B. Williams | last post by:
I am receiving two warnings in my code and can't figure out why. Will someone look at this and tell me what I have done wrong? #include <iostream> using std::cout; #include <string> ...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
2
by: curious2007 | last post by:
I do not know how to handle this message: c:\users\admin\documents\visual studio 2005\projects\vec\vec\fileclass.cpp(40) : warning C4996: 'fopen' was declared deprecated c:\program...
13
by: lordhoban | last post by:
I've been trying to get this, but no matter what method I try, nothing works and the book shows only the most simplistic examples. I have other functions currently that run, but with global values. I...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.