-strict_std [V1.07.00 or later]


This option processes the C source program in strict accordance with the language standard.

[Specification format]

-strict_std [V1.07.00 or later]
-Xansi [Compatible use with V1.06.00 and earlier versions]

 

-

Interpretation when omitted

Compatibility with the conventional C language specifications is conferred and processing continues after warning is output. Even if -lang=c99 option is not specified, some of the specifications added by C99 are accepted.

[Detailed description]

-

This option processes the C source program in strict accordance with the language standard specified by the -lang option and outputs an error or warning for a specification that violates the standard.

-

For the predefined macros that are valid when this option is specified or not specified, see "(36) Predefined macro names" in "4.1.3 Implementation-defined items".

-

Processing when compiling in strict adherence to the language standard is as follows.

-

When conforming to C90

-

Bit fields

An error will occur if a type other than an int, signed int, or unsigned int type is specified in a bit field.

If this option is not specified, specifying a type other than an int type will be enabled (A warning will not be output).

-

#line-number

An error will occur.

If this option is not specified, "#line-number" will be handled in the same way as "#line line-number".

-

Argument of function for which #pragma inline is specified

If the type of the return value or parameter is different but type conversion is possible between the specified function call and definition, an error will occur.

If this option is not specified, the type of the return value is converted to the type at the call side, the parameters are converted to the type of the function definition, and inline expansion is performed.

-

Basic type

An error will occur if a _Bool, long long, unsigned long long, or __fp16 type is specified.

-

Structure and union specifiers

If the member declaration list does not include named members, then an error message will be output indicating that the list has no effect.

-

When conforming to C99

-

#line-number

An error will occur.

When this option is not specified, it is treated in the same manner as "#line line-number".

-

Parameters of functions declared with #pragma inline

If the type of a return value or parameter is different but type conversion is possible between the specified function call and definition, then an error will occur.

When this option is not specified, the type of the return value is converted to the type at the calling site, the parameters are converted to the type of the function definition, and inline expansion is performed.

-

Basic type

An error will occur if a __fp16 type is specified.

-

Structure and union specifiers

If the member declaration list does not include named members, then an error will occur.