Intel® oneAPI DPC++/C++ Compiler

Developer Guide and Reference

ID 767253
Date 3/31/2025
Public

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

Visible to Intel only — GUID: GUID-3893FB07-9E0F-4061-84F5-31B45D26778D

Document Table of Contents

qunknown-option-as-warning

Tells the compiler to treat unknown compiler options on Linux* as a warning instead of an error.

Syntax

Linux:

-qunknown-option-as-warning

-qno-unknown-option-as-warning

Windows:

None

Arguments

None

Default

-qno-unknown-option-as-warning

When unknown compiler options are encountered on Linux, the compiler emits diagnostic errors.

Description

This option tells the compiler to treat unknown compiler options on Linux as a warning instead of an error.

If qno-unknown-option-as-warning is specified, unknown compiler options on Linux are treated as errors.

NOTE:

This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation.

IDE Equivalent

None

Alternate Options

None

Example

The following shows an unknown compiler option in the command line:

icpx -qunknown-option-as-warning -fbad-opt file.cpp

In this case, the compiler will issue this diagnostic:

icpx: warning: unknown argument ignored: '-fbad-opt' [-Wunknown-argument]