[Freeciv-Dev] Re: (PR#7279) Macro optimizations
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7279 >
> On Wed, Jan 21, 2004 at 09:24:41AM -0800, Arnstein Lindgard wrote:
>> On Tue, 20 Jan 2004 17:10:39 -0800 rwetmore@xxxxxxxxxxxx wrote:
>>
>> > Some interesting comments on inline functions from Stroustrup.
>> >
>> > The order of evaluation of actual arguments to functions is udefined.
>> > In particular, an inline expansion is not required to preserve the
>> > order of evaluation of actual arguments that the implementation ould
>> > have produced for an out-of-line call. Since one call of a
function in a
>> > program may be inlined while another is handled by the normal fnction
>> > call mechanism, this can lead to two calls to the same function with
>> > identical actual arguments yielding different results.
>>
>> Can the order of evaluation of function arguments really be relevant?
>
> Not the last time I checked this. splint reports this. It is bad/wrong
> even without inlineing.
I can't believe this is being used as an argument *against* using
functions in favor of macros. Although the order of evaluation of
arguments may be undefined in an inline function call, at least you know
that each argument will be evaluated *exactly once*. In a macro you get
no such guarantee.
jason
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, (continued)
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/20
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Jason Short, 2004/01/20
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Per I. Mathisen, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Raimar Falke, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Arnstein Lindgard, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Arnstein Lindgard, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Arnstein Lindgard, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Raimar Falke, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Raimar Falke, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations,
Jason Short <=
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/21
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Jason Short, 2004/01/22
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Jason Short, 2004/01/22
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Arnstein Lindgard, 2004/01/22
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/23
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, Arnstein Lindgard, 2004/01/25
- [Freeciv-Dev] Re: (PR#7279) Inline/Macro optimizations, Arnstein Lindgard, 2004/01/25
- [Freeciv-Dev] Re: (PR#7279) Macro optimizations, rwetmore@xxxxxxxxxxxx, 2004/01/26
|
|