Inconsistency with coreutils: _Static_assert()
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed May 22 17:58:00 GMT 2013
On May 22 18:17, Denis Excoffier wrote:
> On 2013-05-22 10:53, Corinna Vinschen wrote:
> > Can you test this patch to sys/cdefs.h, please?
> >
> > Index: sys/cdefs.h
> > ===================================================================
> > RCS file: /cvs/src/src/newlib/libc/include/sys/cdefs.h,v
> > retrieving revision 1.4
> > diff -u -p -r1.4 cdefs.h
> > --- sys/cdefs.h 22 Apr 2013 10:28:05 -0000 1.4
> > +++ sys/cdefs.h 22 May 2013 08:52:51 -0000
> > @@ -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]
> >
> This patch works perfectly. Thank you.
Thanks for testing. I applied the patch.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list