summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/basedefs.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-14 12:41:57 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-15 08:37:11 +0200
commitdc18190be4bdfa5b0fc297760f64e7915c131ff3 (patch)
treef7845c41cbc9ab8f1292571eabec07f33fc5126a /cpukit/score/include/rtems/score/basedefs.h
parentsp74.doc: Correct minor typos (diff)
downloadrtems-dc18190be4bdfa5b0fc297760f64e7915c131ff3.tar.bz2
score: Add and use RTEMS_ZERO_LENGTH_ARRAY
Diffstat (limited to 'cpukit/score/include/rtems/score/basedefs.h')
-rw-r--r--cpukit/score/include/rtems/score/basedefs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h
index c6f639b8d5..a0bebddc0e 100644
--- a/cpukit/score/include/rtems/score/basedefs.h
+++ b/cpukit/score/include/rtems/score/basedefs.h
@@ -208,6 +208,13 @@
#define RTEMS_ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
+/*
+ * Zero-length arrays are valid in C99 as flexible array members. C++11
+ * doesn't allow flexible array members. Use the GNU extension which is also
+ * supported by other compilers.
+ */
+#define RTEMS_ZERO_LENGTH_ARRAY 0
+
#ifndef ASM
#ifdef RTEMS_DEPRECATED_TYPES
typedef bool boolean;