CL Command-Line Warnings

The general form of a CL.EXE warning message is

cl : Command line warning Dnumber : text

The message is written to standard error. Note however, that unless CL detects /E, /EP, /P or /Zg on its command line, it eventually duplicates standard output as standard error. In practice then, warnings that occur sufficiently early are reported to whatever file or device CL was given as standard error, but warnings that occur later are reported to whatever CL was given as standard output. This behaviour seems to be undocumented, but knowledge of it is important if depending on command-line redirection for capturing CL warning messages to a file.

The table below lists the command-line warnings that the CL.EXE program is known to be capable of issuing in version 13.00.9466. Text for each warning message is reproduced from the corresponding resource string in the executable, with placeholders resolved as much as possible in the style of the product documentation.

Warning numbers that the product documentation does not list among the Command-Line Errors D2000 Through D4028 are highlighted yellow. Three warnings, D4000, D4020 and D4029, that are listed by the product documentation do not appear below, because CL (i.e., the product) seems to have no code for producing them. Two more, D4027 and D4028 are documented, but as errors.

Error Message
D4002 ignoring unknown option 'option'
D4007 'option1' requires 'option2'; option ignored
D4014 invalid value 'number1' for '/option'; assuming 'number2'
D4015 invalid assembly listing configuration 'option'
D4021 no action performed
D4024 unrecognized source file type 'filename', object file assumed
D4025 overriding '/option1' with '/option2'
D4026 options apply to entire command line
D4027 source file 'filename' ignored
D4028 minimal rebuild failure, reverting to normal build
D4030 operation is incompatible with multiprocessing; ignoring /MP switch
D4031 inefficiently creating temporary il file; clean temp directory of old il files