Skip to main content

IAR Embedded Workbench for RX 5.20

GCC constant expressions

In this section:

In GNU mode—when the compiler option ‑‑language=gnu has been specified—the compiler permits an extended range of expressions and variables to be used in constant expressions. For example:

  • const variables are allowed in constant expressions, as are subscripts of const arrays

  • non-constant expressions are allowed in unevaluated parts of constant expressions

  • compound literals

Note

There might be cases where GCC allows an expression but the IAR compiler does not, and vice versa.