8.174 --strict_warnings

Diagnostics that are errors in --strict mode are downgraded to warnings, where possible.

It is sometimes not possible for the compiler to downgrade a strict error, for example, where it cannot construct a legitimate program to recover.

Errors

When --strict_warnings is in force and a violation of the relevant ISO standard occurs, the compiler normally issues a warning message.

The severity of diagnostic messages can be controlled using the --diag_error, --diag_remark, and --diag_warning options.

Note

In some cases, the compiler issues an error message instead of a warning when it detects something that is strictly illegal, and terminates the compilation. For example:

#ifdef $Super$
extern void $Super$$__aeabi_idiv0(void); /* intercept __aeabi_idiv0 */
#endif

Compiling this code with --strict_warnings generates an error if you do not use the --dollar option.

Examples

void foo(void)
{
    long long i; /* okay in nonstrict C90 */
}

Compiling this code with --strict_warnings generates a warning message.

Compilation continues, even though the expression long long is strictly illegal.

Related reference
8.5 --anachronisms, --no_anachronisms
8.56 --diag_error=tag[,tag,...]
8.57 --diag_remark=tag[,tag,...]
8.61 --diag_warning=tag[,tag,...]
8.174 --strict_warnings
9.19 Dollar signs in identifiers
1.2 Source language modes of the compiler
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.