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: Richard Freeman <rich0@g.o>
Subject: Re: FYI: Rules for distro-friendly packages
Date: Sun, 27 Jun 2010 07:28:34 -0400
On 06/27/2010 06:52 AM, Enrico Weigelt wrote:
>> remark #981: operands are evaluated in unspecified order (tons of them)
>>        return strcmp( left.c_str(), right.c_str() )>  0;
>
> I'm not sure if this really qualifies an warning, since - AFAIK -
> C spec never said, that there is an evaluation order for
> function parameters.
>

I could see how somebody might make that assumption (incorrectly), and 
get burned by this.  However, creating local variables just to hold 
intermediate results so as to not embed them in function calls seems to 
be a lot of overhead - certainly in terms of readability, and I can't 
think of a situation where the compiler would have to do it on its own. 
  I guess religiously doing this might make the code less likely to 
contain very subtle bugs, but perhaps it is a bit over the top for 
anybody who wouldn't be otherwise developing in ADA.

Rich


References:
FYI: Rules for distro-friendly packages
-- Enrico Weigelt
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
-- Sergei Trofimovich
Re: FYI: Rules for distro-friendly packages
-- Enrico Weigelt
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: FYI: Rules for distro-friendly packages


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.