473,378 Members | 1,387 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,378 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 3439
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.