X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:date:from:to:cc:subject:message-id; q=dns; s=default; b=TnjaD2gEV+4dLHh1mQ8fv+usTdDV73yAvOlFOOXYR9U tOs4MbkniG1Q0yLzaD896UP/nveRoAJiVt+nypWsTbmws8PKo/qQps7dSJ0uOe8f lUJnts6fRoJh1B8s+7QBXkuDfkz5aj43k95DdWrNVbXjwzF3fSyDMFDGrUN1qteU = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:date:from:to:cc:subject:message-id; s=default; bh=KwDe2vhxTUefaKXKuKhicuwtOZc=; b=V95Ou5jlHToU1/iz3 9zoSUkrpVlFCEhwHfRwTtAhAFz9PozgmSvJ7Nzb4CO+OBvXNsiipB+yoofcLF27b ygrBtU+iYduNaxQs5ZsrK6iMMsjf3LYpVdBncVobDYyTWkAi9BsuQjb/qFaJWk4n PBcsAUp1ACbw8CTZ3ssH45fNPs= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 21 May 2013 17:59:33 +0200 From: Denis Excoffier To: Cc: Subject: Inconsistency with coreutils: =?UTF-8?Q?=5FStatic=5Fassert=28=29?= Message-ID: <97bfaa4aab229c706de5732905c96b44@denis-excoffier.org> X-Sender: cygwin AT Denis-Excoffier DOT org User-Agent: Roundcube Webmail/0.7.2 Hello, I compile coreutils-8.21 under Cygwin (Windows XP). I'm using gcc-4.8.0 with no problem, except that under _any_ snapshot posterior to plain 1.7.18, i obtain the following (with plain 1.7.18, or under gcc-4.5.3 it works perfectly): --------------- ... depbase=`echo src/chroot.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ gcc -std=gnu99 -I. -I./lib -Ilib -I./lib -Isrc -I./src -g -O2 -MT src/chroot.o -MD -MP -MF $depbase.Tpo -c -o src/chroot.o src/chroot.c &&\ mv -f $depbase.Tpo $depbase.Po In file included from /usr/include/sys/stdio.h:14:0, from /usr/include/stdio.h:62, from ./lib/stdio.h:43, from src/chroot.c:21: src/chroot.c: In function 'set_additional_groups': ./lib/verify.h:181:8: error: expected specifier-qualifier-list before 'typedef' _Static_assert (R, DIAGNOSTIC); \ ^ ./lib/verify.h:166:16: note: in expansion of macro '_GL_VERIFY_TYPE' (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) ^ ./lib/verify.h:230:25: note: in expansion of macro '_GL_VERIFY_TRUE' # define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") ^ src/system.h:247:35: note: in expansion of macro 'verify_true' #define X2NREALLOC(P, PN) ((void) verify_true (sizeof *(P) != 1), \ ^ src/chroot.c:103:16: note: in expansion of macro 'X2NREALLOC' gids = X2NREALLOC (gids, &n_gids_allocated); ^ Makefile:6662: recipe for target 'src/chroot.o' failed make: *** [src/chroot.o] Error 1 --------------- I have narrowed the problem down to /usr/include/sys/cdefs.h, where (line 271) you have _Static_assert defined: #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) This definition occurs even under GCC 4.6.0 (and later) where _Static_assert() indeed works. As a consequence, it no longer works as expected in coreutils-8.21/lib/verify.h (lines 24 and 181). With line 271 of /usr/include/sys/cdefs.h commented out, everything is fine. I suppose that /usr/include/sys/cdefs.h should be adjusted (if compilation under GCC >= 4.6 is desired). For coreutils also, _Static_assert() should be _tested_ (as part of configure) instead of to rely on some GCC version. Regards, Denis Excoffier. -- 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