Parsing for Syntax Only

Use the -syntax option to stop processing source files after they have been parsed for C++ language errors. This option provides a method to quickly check whether sources are syntactically and semantically correct. The compiler creates no output file. In the following example, the compiler checks a file named prog1.cpp. Any diagnostics appear on the standard error output.