| |||
| Home > Compiler Command-line Options > ‑‑strict, --no_strict | |||
This option 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.
--strict enforces compliance with:
ISO/IEC 9899:1990, the 1990 International Standard for C.
ISO/IEC 9899 AM1, the 1995 Normative Addendum 1.
ISO/IEC 9899:1999, the 1999 International Standard for C.
ISO/IEC 14822:2003, the 2003 International Standard for C++.
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 in the usual way.
void foo(void)
{
long long i; /* okay in nonstrict C90 */
}
Compiling this code with --strict generates
an error.