This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
test_struct.test_short = 0x1234; printf("%04x\n", test_struct.test_short);
_may_ work. I don't think it's guaranteed to work, though.
test_pointer = &test_var.test_short;
test_pointer now points to an odd address. Dereferencing it will almost certainly not work right, since the compiler doesn't generate run-time checks for misaligned pointers.
*test_pointer = 0x789A;
Doing a 16-bit access to an odd address is undefined on ARM.
-- Bill Gatliff Professional embedded GNU training. bgat@billgatliff.com
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |