Skip to main content

IAR Embedded Workbench for RISC-V 3.40

‑‑warn_about_missing_field_initializers

In this section:
Syntax
‑‑warn_about_missing_field_initializers 
Description

Use this option to make the compiler warn if the initializer for a structure does not provide explicit initializers for all fields in the structure.

No warning is emitted for the universal zero initializer { 0 }, or—in C++—for the empty initializer {}.

In C, initializers that use one or more designated initializers are not checked.

In Standard C++17, designated initializers are not available. When language extensions are enabled (by using -e or #pragma language) they are supported, but, as in C++20, only if the designated initializers are in field order. In this case, the structure is checked for missing initializers.

Caution

This option is not available in the IDE.