Address assignment

Paul Koning pkoning@equallogic.com
Wed Sep 14 20:53:00 GMT 2005


>>>>> "Dave" == Dave Korn <dave.korn@artimi.com> writes:

 >> Why add an unneeded level of indirection?  Especially on
 >> time-critical embedded systems?

 Dave> These days, I really have *lots* of faith in the compiler to be
 Dave> able to optimise that away[*].  But I guess you could always
 Dave> write

 Dave> #define my_struct (*(struct my_struct_type *)0xa0001028)

 Dave> and treat it just like an object

 Dave> my_struct.x = 3;

If you don't want accesses optimized away, you need "volatile".

   paul



More information about the Binutils mailing list