By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,417 Members | 1,845 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,417 IT Pros & Developers. It's quick & easy.

Silencing compiler warning D9025

P: n/a
We have some C++ code that has a makefile which contains both /W2 and /W3.
Due to the way the makefiles are written to be shared across multiple
projects, it's not trival to eliminate the duplicate compiler warning-level
directives. I'm trying to find a way to silence the following warning
displayed by Visual Studio 2005 for each file compiled:

cl : Command line warning D9025 : overriding '/W2' with '/W3'

One would think you could add '/wd9024' to the build rules to silence this.
But no - this option just adds a second warning to each file compiled:

cl : Command line warning D9014 : invalid value '9025' for '/wd'; assuming
'4999'

Any suggestions other then just removing one of /W3 or /W2 from the options
list?

Thanks for any tips you can share.

-----
John Harris
Apr 11 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
> We have some C++ code that has a makefile which contains both /W2 and /W3.
Due to the way the makefiles are written to be shared across multiple
projects, it's not trival to eliminate the duplicate compiler warning-level
directives. I'm trying to find a way to silence the following warning
displayed by Visual Studio 2005 for each file compiled:

cl : Command line warning D9025 : overriding '/W2' with '/W3'

One would think you could add '/wd9024' to the build rules to silence this.
But no - this option just adds a second warning to each file compiled:

cl : Command line warning D9014 : invalid value '9025' for '/wd'; assuming
'4999'
/wd is used to silence compiler warning. i.e. Cxxxx. Since C9025 does not
exist, It defaults to C4999, which is defined as 'Unknown warning'
Any suggestions other then just removing one of /W3 or /W2 from the options
list?

Thanks for any tips you can share.


I have not used makefiles on windows, but I have done some projects on linux
that used makefiles. what we did there is specifying settings like that as
variables.
doing that makes it easy to supply default settings that can be changed.

As long as you use only that variable for specifying that setting, you will
not get duplicate /WX specifications.
VAR=/W3
VAR=/W2 //override previous

Another construct that might be useful is that in makefiles (at least on
linux) you can use a special construct that only assigns value to VAR if VAR
did not yet exist until that point. I think it was @= or $= (too long ago)

I don't know your build infrastructure, but by using these things you should
be able to achieve builds with only a single /W specification

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"

Apr 11 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.