Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Error Handling

This topic describes compiler warnings and errors. The compiler sends these messages, along with the erroneous source line, to stderr.

Warnings

Warning messages report legal but questionable use of C or C++. The compiler displays warnings by default. You can suppress warning messages by specifying an appropriate compiler option. Warnings do not stop translation or linking. Warnings do not interfere with any output files.

The following is a representative warning message:

   unknown pragma ignored [-Wunknown-pragmas] 

Some warnings that start with -W can be disabled using the negative form of the option -Wno-. For example, option -Wno-unknown-pragmas disables option -Wunknown-pragmas.

Errors

Error messages report syntactic or semantic misuse of C or C++. The compiler always displays error messages. Errors suppress object code for the module containing the error and prevent linking, but they allow parsing to continue to detect other possible errors.

The following are some representative error messages:

expected ';' at end of declaration
unexpected type name 'b': expected expression

For a summary of warning and error options, see the Clang documentation.