summaryrefslogtreecommitdiffstats
path: root/src/include/compiler.h
diff options
context:
space:
mode:
authorMichael Brown2005-05-17 14:16:28 +0200
committerMichael Brown2005-05-17 14:16:28 +0200
commit3bbf5f28a37e2dda53a835de59c99fdb6fdf631e (patch)
tree954b88c043ada9877855342dae041598c96a2238 /src/include/compiler.h
parentUse the heap functions to allocate a load buffer. (diff)
downloadipxe-3bbf5f28a37e2dda53a835de59c99fdb6fdf631e.tar.gz
ipxe-3bbf5f28a37e2dda53a835de59c99fdb6fdf631e.tar.xz
ipxe-3bbf5f28a37e2dda53a835de59c99fdb6fdf631e.zip
Use __unused instead of __used for static data structures.
Remove compiler.h defines from osdep.h
Diffstat (limited to 'src/include/compiler.h')
-rw-r--r--src/include/compiler.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h
index 4912b424..4a7c48a1 100644
--- a/src/include/compiler.h
+++ b/src/include/compiler.h
@@ -84,9 +84,18 @@ __asm__ ( ".equ\tDEBUG_LEVEL, " DEBUG_SYMBOL_STR );
} while (0)
#endif
-#define PACKED __attribute__((packed))
-#define __unused __attribute__((unused))
-#define __used __attribute__((used))
+/*
+ * Commonly-used attributes.
+ *
+ * Note that __used can be used only for functions. If you have a
+ * static variable declaration that you want to force to be included,
+ * use __unused.
+ *
+ */
+#define PACKED __attribute__ (( packed ))
+#define __unused __attribute__ (( unused ))
+#define __used __attribute__ (( used ))
+#define __aligned __attribute__ (( aligned ( 16 ) ))
/*
* To save space in the binary when multiple-driver images are