This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Inconsistency with coreutils: _Static_assert()
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 22 May 2013 19:58:06 +0200
- Subject: Re: Inconsistency with coreutils: _Static_assert()
- References: <97bfaa4aab229c706de5732905c96b44 at denis-excoffier dot org> <20130521160846 dot GP2406 at calimero dot vinschen dot de> <4DB22033-B92B-45C0-81F3-72D10CBDA8C0 at Denis-Excoffier dot org> <20130522085310 dot GV2406 at calimero dot vinschen dot de> <7E8B4273-EEA0-4E04-B1F5-B097290EE0B4 at Denis-Excoffier dot org>
- Reply-to: cygwin at cygwin dot com
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