This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: Address assignment


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


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