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.
IA-32 systems: prompt>icc -syntax prog1.cpp
Itanium(TM)-based systems: prompt>ecc -syntax prog1.cpp