Re: execution order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux