Search

CL.EXE command-line warnings cannot be disabled by Avery Lee

Resolved
as Won't Fix Help for as Won't Fix

5
1
Sign in
to vote
Type: Bug
ID: 100055
Opened: 10/6/2004 9:52:11 PM
Access Restriction: Public
0
Workaround(s)
2
User(s) can reproduce this bug
The /wd command-line switch, which allows warnings to be disabled, does not work for command-line warnings. A couple of valid command-line switches which are listed in cl /? as valid switches, most notably /GX, cause the front-end to issue command-line option deprecation warnings. There doesn't seem to be a way to disable these warnings, which is inconvenient in situations where it is not trivial to remove the problematic flags.

The reason I am running into this problem is that I have a need to stick with Visual C++ 6.0 for the short-term, but am running the VC8 compiler with MSDEV /USEENV to check build compatibility and prepare for an eventual move to VS2005. The build works except that /GX and /YX are causing the VC8 front end to spew D9035 and D9036. /YX is not supported, but /GX shouldn't throw warnings if it is listed as a valid synonym in help.
Details (expand)
Product Language
English
Version
Visual Studio 2005 Beta 1
Category
Language/Compiler
Operating System
Windows XP Professional
Operating System Language
US English
Steps to Reproduce
At the command line: cl /c /wd9035 /wd9036 /GX foo.cpp

Any .cpp file will do, obviously.
Actual Results
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.40607.16 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

cl : Command line warning D9014 : invalid value '9035' for '/wd'; assuming '4999'
cl : Command line warning D9035 : option 'GX' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
foo.cpp
Expected Results
Both D9035 and D9036 should have been disabled.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Niels Dekker on 7/26/2011 at 11:56 PM
FYI, yesterday I posted another issue which is also about command-line warning D9035: "Please do not remove the Visual C++ compiler option 'nologo-'", https://connect.microsoft.com/VisualStudio/feedback/details/680839/please-do-not-remove-the-visual-c-compiler-option-nologo

I do think it would be helpful to be able to disable such a command-line warning, so I just voted in favor of your issue (100055) as well.
Posted by Microsoft on 6/1/2006 at 4:38 PM
Hi: Thanks for bring this issue to our attention. Unfortunately after reviewing this bug against our current bug-bar
we have decided that this bug doesn't meet the criteria for fixing in the next release of the product.

For more details on our bug-bar please follow this link:

http://blogs.msdn.com/vcblog/archive/2006/05/30/610989.aspx

We will keep the bug in our database and if time permits we will take another look at it.

Jonathan Caves
Visual C++ Compiler Team
Posted by Microsoft on 10/24/2005 at 5:58 PM
This issue has been reactivated as we begin planning for the next version of Visual Studio. Over the coming months we will reconsider feedback that was previously postponed. We welcome your comments and participation in this process.

-- Visual Studio Team
Posted by Microsoft on 10/8/2004 at 4:15 PM
Warnings from cl that cannot be disabled are mostly harmless in that they can never break a build. Most often, it makes more sense to fix the command line rather than to ignore the warnings. I can think of one exception - when a switch is removed from a future version of the compiler, you might have a project that still uses that switch with an older compiler. At any rate, we don't have any plans to add a way to disable driver warning switches in Whidbey, we'll consider it in a future release.
Posted by Microsoft on 10/7/2004 at 11:57 AM
Thank you for submitting this to us. We will investigate and keep you informed.
Visual C++ Team
Sign in to post a workaround.