Question about -ansi flag, and different size of struct from C and C++

Oleg Ivanov Belinus at zelax.ru
Mon Dec 15 14:18:01 UTC 2003


   Thanks a lot!

   Yes, I also see #pragma warning: ignoring pragma: even if I compiling 
with or without -ansi flag.
   And another thing, I compile code under two targets Motorola 68360 
and 860.
   In one point compiler aligned all struct to 4, in other every struct 
member.
   That mean size of struct
   struct dummy {
      int var1;
      short var2;
      int var3;
      short var4;
   }
   on motorola 68360 will be 12 byte, and on 860 - 16 byte...
Is it also target dependent ?








More information about the users mailing list