Ok, coming from an assembler background i know about putting elements within structures on multiples of 2/4/8 byte boundarys for efficiency and/or to prevent illegal access violations.
But on a current (16 bit dos vc++ v1.52) project, i have found a problem that has confused me.
Basically, what effect does /Zpn have (given a value of 1,2 or 4 for n). It has no effect on the structure in memory... i always get a sizeof 20 for my struct, no matter which value of n i use. It also has no effect on arrays of the structure.
I ask because i am working on a project where a client claims they havent changed structure definitions, and simply recompiled with a higher value of n (/Zp4, instead of /Zp2). But i`ve only managed to fix our side of things by explicitly adding padding bytes to the struct (before a long, which is what seems to want to be on a multiple of 4 now, not the multiple of 2 it was previously happy with).
What could they have done? Or more generally (if you didnt follow the previous paragraph), what does /Zp4 actually change?