This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: execution order


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?
>   

use the "volatile" keyword to tell the compiler not to optimize access
to a variable.

Maybe that will work with a class too... who knows I don't code C++...

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]