add alignof to compilier specific

add static_assert support for IAR (built-in support)
This commit is contained in:
hathach
2013-03-04 15:01:33 +07:00
parent 5207875add
commit 656da2992d
8 changed files with 37 additions and 10 deletions

View File

@@ -51,6 +51,8 @@
extern "C" {
#endif
#define ALIGN_OF(x) __alignof__(x)
/// Normally, the compiler places the objects it generates in sections like data or bss & function in text. Sometimes, however, you need additional sections, or you need certain particular variables to appear in special sections, for example to map to special hardware. The section attribute specifies that a variable (or function) lives in a particular section
#define ATTR_SECTION(section) __attribute__ ((#section))

View File

@@ -51,6 +51,8 @@
extern "C" {
#endif
#define ALIGN_OF(x) __ALIGNOF__(x)
#define ATTR_PREPACKED __packed
#define ATTR_PACKED