From: Corinna Vinschen Date: Wed, 22 May 2013 17:53:07 +0000 (+0000) Subject: * libc/include/sys/cdefs.h (_Static_assert): Accommodate gcc >= 4.6. X-Git-Tag: sid-snapshot-20130601~27 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=742fb38c56c2be314b8e0a2492dc483a6550d108;p=newlib-cygwin.git * libc/include/sys/cdefs.h (_Static_assert): Accommodate gcc >= 4.6. --- diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 797a67188..dc77b7e9a 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,7 @@ +2013-05-22 Corinna Vinschen + + * libc/include/sys/cdefs.h (_Static_assert): Accommodate gcc >= 4.6. + 2013-05-16 Sebastian Huber * libc/reent/reent.c (_wrapup_reent): Remove. 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]