|
sarmfsw: SMFSW Toolbox (desinged for ARM / compatible with other 8b/16b/32b platforms) 4.0rc
SMFSW collection of miscellaneous functions \& macros (desinged for ARM / compatible with other 8b/16b/32b platforms)
|
ARM common compilers attributes. More...

Macros | |
| #define | __WEAK __attribute__((weak)) |
| Weak attribute. | |
| #define | __IRQ __attribute__((interrupt_handler)) |
| Interrupt attribute. | |
| #define | ATTR__(...) |
Macro to define one or multiple attribute(s) ... for a declaration. | |
| #define | ALIGN__(n) |
Align attribute padded to n. | |
| #define | COLD__ __attribute__((cold)) |
| Cold attribute. | |
| #define | DEPRECATED__ __attribute__((deprecated)) |
| Deprecated attribute. | |
| #define | HOT__ __attribute__((hot)) |
| Hot attribute. | |
| #define | INLINE__ __attribute__((always_inline)) |
Always inline attribute. | |
| #define | NONNULL__ __attribute__((nonnull)) |
Non null attribute (all pointers will be checked) | |
| #define | NONNULLX__(...) |
Non null attribute for ... pointers indexes. | |
| #define | NORETURN__ __attribute__((__noreturn__)) |
No return attribute. | |
| #define | PACK__ __attribute__((packed)) |
| Packed attribute. | |
| #define | PURE__ __attribute__((pure)) |
| Pure attribute. | |
| #define | SECTION__(s) |
Section attribute to place declaration into section s. | |
| #define | USED__ __attribute__((used)) |
| Used attribute ensures declaration won't be removed by garbage collector. | |
| #define | NONNULL_INLINE__ ATTR__(nonnull, always_inline) |
Non null and Always inline attributes. | |
| #define | PRINTF__(x, y) |
| Printf format attribute. | |
| #define | FMT_ARG__(x) |
| Format argument attribute. | |
| #define | SSO(o) |
| Alias for Scalar Storage Order. | |
| #define | BIG_ENDIAN__ ATTR__(packed, SSO(big-endian)) |
| Force structure in Big-Endian (use wisely or not at all) | |
| #define | LITTLE_ENDIAN__ ATTR__(packed, SSO(little-endian)) |
| Force structure in Little-Endian (use wisely or not at all) | |
| #define | __NOOPT__ |
| No Optimizations attribute. | |
ARM common compilers attributes.
Set attributes following compiler
Header scope deviation has been granted for following rules:
Rule-20.5 - Advisory: #undef (misra-c2012-20.5)
Rule-20.10 - Advisory: # and ## preprocessor operators (misra-c2012-20.10)
Header scope legitimate use derogation authorized for:
Rule-21.1 - Required: #define and #undef on reserved identifiers (misra-c2012-21.1)
Justification: #define are generic reserved identifiers for attributes.
| #define __IRQ __attribute__((interrupt_handler)) |
Interrupt attribute.
| #define __NOOPT__ |
No Optimizations attribute.
| #define __WEAK __attribute__((weak)) |
Weak attribute.
| #define ALIGN__ | ( | n | ) |
Align attribute padded to n.
| #define ATTR__ | ( | ... | ) |
Macro to define one or multiple attribute(s) ... for a declaration.
Force structure in Big-Endian (use wisely or not at all)
| #define COLD__ __attribute__((cold)) |
Cold attribute.
| #define DEPRECATED__ __attribute__((deprecated)) |
Deprecated attribute.
| #define FMT_ARG__ | ( | x | ) |
Format argument attribute.
| #define HOT__ __attribute__((hot)) |
Hot attribute.
| #define INLINE__ __attribute__((always_inline)) |
Always inline attribute.
Force structure in Little-Endian (use wisely or not at all)
| #define NONNULL__ __attribute__((nonnull)) |
Non null attribute (all pointers will be checked)
| #define NONNULL_INLINE__ ATTR__(nonnull, always_inline) |
Non null and Always inline attributes.
| #define NONNULLX__ | ( | ... | ) |
Non null attribute for ... pointers indexes.
| #define NORETURN__ __attribute__((__noreturn__)) |
No return attribute.
| #define PACK__ __attribute__((packed)) |
Packed attribute.
| #define PRINTF__ | ( | x, | |
| y ) |
Printf format attribute.
| #define PURE__ __attribute__((pure)) |
Pure attribute.
| #define SECTION__ | ( | s | ) |
Section attribute to place declaration into section s.
| #define SSO | ( | o | ) |
Alias for Scalar Storage Order.
| #define USED__ __attribute__((used)) |
Used attribute ensures declaration won't be removed by garbage collector.