7.145 --strict, --no_strict

Enforces or relaxes strict C or strict C++, depending on the choice of source language used.

When --strict is selected:
  • Features that conflict with ISO C or ISO C++ are disabled.
  • Error messages are returned when nonstandard features are used.

Default

The default is --no_strict.

Usage

--strict enforces compliance with:
ISO C90
  • ISO/IEC 9899:1990, the 1990 International Standard for C.
  • ISO/IEC 9899 AM1, the 1995 Normative Addendum 1.
ISO C99
ISO/IEC 9899:1999, the 1999 International Standard for C.
ISO C++
ISO/IEC 14822:2003, the 2003 International Standard for C++.

Errors

When --strict is in force and a violation of the relevant ISO standard occurs, the compiler issues an error message.
The severity of diagnostic messages can be controlled using the --diag_error, --diag_remark, and --diag_warning options.

Examples

void foo(void)
{
    long long i; /* okay in nonstrict C90 */
}
Compiling this code with --strict generates an error.
Related reference
7.19 --c90
7.20 --c99
7.25 --cpp
2.7 Filename suffixes recognized by the compiler
7.5 --anachronisms, --no_anachronisms
1.2 Source language modes of the compiler
2.7 Filename suffixes recognized by the compiler
7.41 --diag_error=tag[,tag,...]
7.42 --diag_remark=tag[,tag,...]
7.46 --diag_warning=tag[,tag,...]
7.146 --strict_warnings
8.19 Dollar signs in identifiers
1.2 Source language modes of the compiler
Non-ConfidentialPDF file icon PDF versionARM DUI0375E
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.