From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-dev+bounces-41575-garchives=archives.gentoo.org@lists.gentoo.org>) id 1OSvRJ-00089F-E8 for garchives@archives.gentoo.org; Sun, 27 Jun 2010 17:14:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 09BB0E0C7D; Sun, 27 Jun 2010 17:14:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 337ADE0C74 for <gentoo-dev@lists.gentoo.org>; Sun, 27 Jun 2010 17:14:32 +0000 (UTC) Received: from gentoo.org (cp1107341-a.dbsch1.nb.home.nl [84.31.115.1]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPSA id 747061B4054 for <gentoo-dev@lists.gentoo.org>; Sun, 27 Jun 2010 17:14:31 +0000 (UTC) Date: Sun, 27 Jun 2010 19:14:54 +0200 From: Harald van =?utf-8?Q?D=C4=B3k?= <truedfx@gentoo.org> To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: FYI: Rules for distro-friendly packages Message-ID: <20100627171454.GA2656@boostbox> References: <4C252C8E.8020408@gentoo.org> <20100626193915.GD4789@nibiru.local> <20100626205001.365b51cb@snowcone> <20100626195733.GF4789@nibiru.local> <20100626211254.002784d4@snowcone> <i06ouu$eos$1@dough.gmane.org> <20100627104724.GC23460@nibiru.local> <i07e9t$356$1@dough.gmane.org> <20100627122258.GA8754@boostbox> <i07o8g$ug0$1@dough.gmane.org> Precedence: bulk List-Post: <mailto:gentoo-dev@lists.gentoo.org> List-Help: <mailto:gentoo-dev+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org> X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <i07o8g$ug0$1@dough.gmane.org> User-Agent: Mutt/1.5.20 (2009-06-14) Content-Transfer-Encoding: quoted-printable X-Archives-Salt: c7ab715b-fcf0-4a6e-bde2-8c2061a67e98 X-Archives-Hash: ec3a52aa52fcd69a476a919f39c7ac83 On Sun, Jun 27, 2010 at 05:46:28PM +0300, Nikos Chantziaras wrote: > On 06/27/2010 03:23 PM, Harald van D=C4=B3k wrote: > > The compiler is not totally free to ignore the register keyword. > > Both the C and the C++ standards require that the compiler complain > > when taking the address of a register variable. Other compilers will > > issue a hard error for it. Fixing the code to not declare the > > variable as register would be the correct thing to do. >=20 > No, it would not be the correct thing to do, because of the following.=20 > (This is part of a discussion between me and someone quite smarter than= =20 > me, who explained the issue in detail.) > > [snip] That explanation seems to be written by someone who does not know that taking the address of a register variable is simply not allowed. > OK, long read, but the the conclusion is that "fixing the code to not=20 > declare the variable as register would be the correct thing to do" it=20 > *not* the correct thing to do. The correct thing to do is to ignore th= e=20 > warning, which is not possible if warnings are turned into errors. And which is not possible if the warning is a hard error in the first pla= ce. > You also mentioned that "other compilers will issue a hard error for=20 > it." That sounds rather strange, and I wonder which compilers that=20 > might be; someone should file a bug report against them ;) Well, let's start with gcc; that's quite an important one for Gentoo...