Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Harald van Dijk <truedfx@g.o>
Subject: Re: Re: FYI: Rules for distro-friendly packages
Date: Sun, 27 Jun 2010 19:14:54 +0200
On Sun, Jun 27, 2010 at 05:46:28PM +0300, Nikos Chantziaras wrote:
> On 06/27/2010 03:23 PM, Harald van Dijk 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.
> 
> No, it would not be the correct thing to do, because of the following. 
> (This is part of a discussion between me and someone quite smarter than 
> 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 
> declare the variable as register would be the correct thing to do" it 
> *not* the correct thing to do.  The correct thing to do is to ignore the 
> 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 place.

> You also mentioned that "other compilers will issue a hard error for 
> it."  That sounds rather strange, and I wonder which compilers that 
> might be; someone should file a bug report against them ;)

Well, let's start with gcc; that's quite an important one for Gentoo...


Replies:
Re: FYI: Rules for distro-friendly packages
-- Nikos Chantziaras
References:
Re: FYI: Rules for distro-friendly packages
-- Petteri Räty
Re: FYI: Rules for distro-friendly packages
-- Enrico Weigelt
Re: FYI: Rules for distro-friendly packages
-- Ciaran McCreesh
Re: FYI: Rules for distro-friendly packages
-- Enrico Weigelt
Re: FYI: Rules for distro-friendly packages
-- Ciaran McCreesh
Re: FYI: Rules for distro-friendly packages
-- Nikos Chantziaras
Re: Re: FYI: Rules for distro-friendly packages
-- Enrico Weigelt
Re: FYI: Rules for distro-friendly packages
-- Nikos Chantziaras
Re: Re: FYI: Rules for distro-friendly packages
-- Harald van Dijk
Re: FYI: Rules for distro-friendly packages
-- Nikos Chantziaras
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: FYI: Rules for distro-friendly packages
Next by thread:
Re: FYI: Rules for distro-friendly packages
Previous by date:
Re: FYI: Rules for distro-friendly packages
Next by date:
Re: Policy for late/slow stabilizations


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.