Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2013-05-22 21:53:07 +0400
committerCorinna Vinschen <corinna@vinschen.de>2013-05-22 21:53:07 +0400
commit742fb38c56c2be314b8e0a2492dc483a6550d108 (patch)
tree9d21ea5a225920d7d6842fb5c1896b7bce6720c7 /newlib/libc
parent14afd12bcde288cdba7b188ec2bb3460e834e056 (diff)
* libc/include/sys/cdefs.h (_Static_assert): Accommodate gcc >= 4.6.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/include/sys/cdefs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/newlib/libc/include/sys/cdefs.h b/newlib/libc/include/sys/cdefs.h
index beeea3251..5f0922c7a 100644
--- a/newlib/libc/include/sys/cdefs.h
+++ b/newlib/libc/include/sys/cdefs.h
@@ -267,7 +267,9 @@
#define _Alignof(x) __alignof(x)
#define _Noreturn __dead2
#define _Thread_local __thread
-#ifdef __COUNTER__
+#if __GNUC_PREREQ__(4, 6) && !defined(__cplusplus)
+/* Do nothing: _Static_assert() works as per C11 */
+#elif defined(__COUNTER__)
#define _Static_assert(x, y) __Static_assert(x, __COUNTER__)
#define __Static_assert(x, y) ___Static_assert(x, y)
#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1]