• 10
• 9
• 13
• 10
• 18

# [VS2015] "/GS-" warning

This topic is 827 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello,

I've read up on the buffer security check (GS) flag, and how it isn't really necessary in a game, and might lead to some speedups. So I wanted to disable it in my shipping build, however I am getting this warning in german:

cl : Befehlszeile warning D9025: "/sdl-" wird durch "/GS-" überschrieben

Can be roughly translated to

cl: Command line warning D9025: "/sdl-" is being overwritten by "/gs-"


I've the SDL (security developement lifecycle) -flag set to false in the project properties, but it really doesn't matter, because I get the same warning if I set it to true:

cl: Command line warning D9025: "/sdl" is being overwritten by "/gs-"


I get this warning literally a thousand times while the compiler is running, like at least once per file it reads, so it really isn't something I can just ignore. Besides I doubt it actually does what I want it to do based on the warning.

So, anyone got any idea what is going wrong? Any other things I have to set up for this to work, or could this be a bug in VS2015? I've attached an image of how I setup those two flags, sorry for the german but you should be able to see it.

Edited by Juliean

##### Share on other sites
First off, why are you turning these checks off? Do you have actual hard profiling data that says these security checks are hurting your game performance? "I read it on the internet somewhere" is not valid profiling data.

To more directly answer your question, it's spelled out in the error for you, as well as on the MSDN pages for /sdl and /GS: The two options overlap, by turning off GS you've already turned off sdl, so the compiler is telling you that turning off sdl doesn't do anything.

(Also, capitalization matters for the command line flags, some flags differ only in capitalization, so it's good you provided the original message as the translation mangled the capitalization )

##### Share on other sites

First off, why are you turning these checks off? Do you have actual hard profiling data that says these security checks are hurting your game performance? "I read it on the internet somewhere" is not valid profiling data.

I didn't do any profiling yet, I wanted to test it out but as soon as I saw those warnings I changed it back because it was driving me insane. It was "I read it on the internet" in the first place, though given with the reasoning that an offline application will not need this setting, and it might affect performance in a positive way. I'll still test it out but I was mainly going by the notion of "it certainly won't hurt".

To more directly answer your question, it's spelled out in the error for you, as well as on the MSDN pages for /sdl and /GS: The two options overlap, by turning off GS you've already turned off sdl, so the compiler is telling you that turning off sdl doesn't do anything.

Huh, I read both the MSDN pages but didn't find that they overlap. I found it now though, quess I must be blind. Also since both /sdl- and /sdl gave me the warning I was confused, but turns out I just need to clear the setting/set it to default, didn't know this was going to make a difference.

So thanks, issue solved :)

##### Share on other sites

for a full tilt lean and mean release build, i use the same settings and get the same exact behavior.

1>------ Build started: Project: caveman, Configuration: Release Win32 ------
1>cl : Command line warning D9025: overriding '/sdl-' with '/GS-'
1>  modeler.cpp
1>  Z3D.cpp
1>  Zaudio.cpp
1>  zfonts.cpp
1>  Zgui.cpp
1>  caveman.cpp
1>  Generating code
1>  Finished generating code
1>  caveman.vcxproj -> C:\Rockland\caveman\Release\caveman.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

this is with vs2012.

vs2010 did it too.

i kind of recall older versions (vs2008 ?) doing it too...

my new policy for release build complier settings is to set GS, and not set SDL, which i believe avoids the warning. but i have yet to test it.

Note that i'm running at max warning level, all warnings as errors, and halt on all errors, and it completes the build like nothing's wrong.

so i've always assumed it was just a bogus message that MS never found and fixed, possibly because only a gamedev would try to turn off all unnecessary code generation, even by using overlapping redundant compiler setting combos that MS didn't anticipate anyone ever trying. and a gamedev would have better things to do than report the bogus message to MS.

the lack of detailed descriptions of the effects of each setting don't help the situation much either.

i'd just forget about it. like i said, i've been using those settings for many years, with no ill effects, other than the override warning  during compile.

Edited by Norman Barrows