c - A __attribute__((packed)) like attribute not GCC Specific -
i use __attribute__((packed)); make items of struct being stored in memory after critical low-level development.
__attribute__((packed)); gcc specific wonder if there similar solution works on ansi/c89/c99/c11 compilers or @ least of them.
there no standard approach accomplish __attribute__((packed)) does. typical solution use #ifdef's handle different compilers. can find few solutions approach @ so post contains details on visual c++ equivalent of __attribute__((packed)). alternatively, gcc supports windows struct packing pragmas, if concerned windows , gcc use windows approach.
Comments
Post a Comment