execution order

Fabian Cenedese Cenedese@indel.ch
Mon Sep 24 14:31:00 GMT 2007


At 14:41 24.09.2007 +0200, Kövesdi György wrote:
>> If the destructor is not inline, and also is not provided in that same
>
>It is used in an embedded application, and because the mentioned destructor is 
>compiled into one machine-code instruction, it would be a big wastage not to 
>inline it.
>The class mentioned in my example and the variable are refer to hardware 
>registers, which are in connection by hardware, and (of course) the accessing 
>order is important.
>Is there any possibility to tell the compiler such a dependency?

That's only a guess, I haven't tried it, but what about:
{
    class c;
    {
        other stuff;
    }
}

Shouldn't gcc then call the destructor of c after other stuff? Or can it still
reorder it if optimizing?

bye  Fabi




More information about the Gcc-help mailing list