Skip to content

SDK v4.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 10 Sep 20:42
· 294 commits to main since this release
5cd46df

Breaking changes

  • The compiler now defaults to the behavior of -fshort-enums. enum types without explicitly specified types now take on the smallest integer type in which they will fit. This generally decreases the space and time overhead of enums, and this choice is common on embedded targets. The old behavior is still available through -fno-short-enums, but it now represents a non-standard ABI, and translation units using this option cannot be guaranteed compatible with those using the default, e.g., the SDK. The new default also comes with a few additional points of care:
    • Changes to the set of enum values can break ABI in more cases than previously
    • Since short and int are the same size on our platform, but are not the same type, a pointer to an enumerator that contains values that only fit in int is now only compatible with a pointer to short, not a pointer to int. Even though these are effectively the same type on our platform, the C standard still rules it undefined behavior to access such an enum through a pointer to int, or to use them in a context where compatible types are expected, e.g., on two branches of the ternary operator.

New targets

New features

Bug fixes