i use keil arm rvct and have small problem RVCT have no #pragma pack(1) but when i got program from my friend i didnt see this program and RVCT didnt say warning about this command - and i have problem because this command destroy execute program for example
#pragma pack(1)
typedef struct { unsigned char command; unsigned long packets; unsigned char reserved[3];
} COMMAND2;
int main() { COMMAND2 cmd2; unsigned long Size;
cmd2.command = 0x01; cmd2.packets = 1000; Size = cmd2.packets; Size = cmd2.command; }
when run this program Size <> 1 at the end !!!
undetermine command #pragma pack(1) create error and compiler dont say warning about this command if correct program for RVTC
typedef __packed struct { unsigned char command; unsigned long packets; unsigned char reserved[3];
we will get ok result
"you may create and look code in your compiler source C is enough"
No, my compiler may be a different version than yours and produce different code. My compile options may be different than yours and produce different code.
"after it we may say something about problem "
No we won't because I'm done with your profound ignorance regarding how to present a problem for discussion or solution.
www.catb.org/.../smart-questions.html
"No, my compiler may be a different version than yours and produce different code. My compile options may be different than yours and produce different code." 1 if you wanted - you got evalution version from keil 2 i try on few version compiler rvtc from keil 3 you say very much words - but dont said word 4 try and look - and dont say what you lower man - and try faqs again