Type attributes
[Types and attributes]
Defines | |
#define | IWRAM_DATA __attribute__((section(".iwram"))) |
Put variable in IWRAM (default). | |
#define | EWRAM_DATA __attribute__((section(".ewram"))) |
Put variable in EWRAM. | |
#define | EWRAM_BSS __attribute__((section(".sbss"))) |
Put non-initialized variable in EWRAM. | |
#define | IWRAM_CODE __attribute__((section(".iwram"), long_call)) |
Put function in IWRAM. | |
#define | EWRAM_CODE __attribute__((section(".ewram"), long_call)) |
Put function in EWRAM. | |
#define | ALIGN(n) __attribute__((aligned(n))) |
Force a variable to an n-byte boundary. | |
#define | ALIGN4 __attribute__((aligned(4))) |
Force word alignment. | |
#define | PACKED __attribute__((packed)) |
Pack aggregate members. | |
#define | DEPRECATED __attribute__((deprecated)) |
Deprecated notice. | |
#define | INLINE static inline |
Inline function declarator. |
Define Documentation
#define ALIGN4 __attribute__((aligned(4))) |
Force word alignment.
- Note:
- In the old days, GCC aggregates were always word aligned. In the EABI environment (devkitPro r19 and higher), they are aligned to their widest member. While technically a good thing, it may cause problems for struct-copies. If you have aggregates that can multiples of 4 in size but don't have word members, consider using this attribute to make struct-copies possible again.
#define DEPRECATED __attribute__((deprecated)) |
Deprecated notice.
Indicates that this function/type/variable should not be used anymore. Replacements are (usually) present somewhere as well.
#define INLINE static inline |
Inline function declarator.
`inline' inlines the function when -O > 0 when called, but also creates a body for the function itself `static' removes the body as well
#define PACKED __attribute__((packed)) |
Pack aggregate members.
By default, members in aggregates are aligned to their native boundaries. Adding this prevents that. It will slow access though.
Generated on Mon Aug 25 17:03:57 2008 for libtonc by 1.5.3