Please consider that this intrusive sentence could instead be proclaiming that you help sponsor this research.

Home > Programming > Tools > Visual C++ > Compiler

Compiler Options

The official literature for CL.EXE does document most command-line options. However, undocumented options do exist and some of the documented options are arguably not documented well—indeed, are documented misleadingly.

In the list below of CL command-line options recognised by version 13.00.9466, those that seem to have been omitted from the product documentation, especially under Compiler Options Listed Alphabetically, are highlighted yellow. Several more have at least some undocumented feature to their syntax or behaviour. Some of the highlighted options are semi-documented, or at least their existence is semi-documented. For instance, they are listed in the output of the cl /? command, or are used in some batch file or makefile that Microsoft publishes either with Visual C++ or with some software development kit. For a few of the highlighted options, Microsoft does publish formal documentation—but for some other of Microsoft’s C/C++ products!

The alternative documentation attempted here assumes familiarity with what I may eventually finish writing about the general syntax of CL options.

For only very few options is more attempted than just the syntax. Indeed, some are just placeholders. I’m sorry, but there are very many compiler options. Documenting them independently of Microsoft can never be more than a work in progress, particularly when that work is the intermittent output of one person’s study, and may easily amount to nothing but a record of some vague intention that got put aside due to lack of interest, support, etc. If you are disappointed by the coverage, express your encouragement in an email.

The options listed below are all those that CL recognises. Anything else causes warning D4002.

Many more compiler options are listed separately, as C1XX options and C2 options, because they are not accepted by CL but must instead be passed indirectly to the relevant compiler module via the CL /d1 and /d2 options.

Copyright © 2005-2006. Geoff Chappell. All rights reserved.

Please consider that this intrusive sentence could instead be proclaiming that you help sponsor this research.

Home > Programming > Tools > Visual C++ > Compiler

[Home][Programming Samples][Application Notes][Security Notes][Editorial][Consultation][Contacts]