mstructure-size-option for x86 32 bit or alternative
Carlos Gomes Martinho
kmartinho8@gmail.com
Wed Mar 27 09:35:00 GMT 2019
Hi
I'm searching an alternative to "mstructure-size-option" for x86 32 bit
instead of ARM.
Background: I have C code which used to run on ARM with KEIL OS, we are
porting this to linux (ARM and x86 32bit)
Now due to the fact how the business logic of this software is, we need
struct alignment of 4 bytes. this code shall not be changed as this is
generated by a tool on the field (PLC software produced depending on the
business case)
I tried to use alignas(4) in the struct, and it seems to work, though I'm
searching for a compiler flag that works everywhere without changing the
source code (manually) -> 300k LoC
ref: I asked already on stackoverflow
https://stackoverflow.com/questions/55364009/gcc-similar-option-as-mstructure-size-option-for-x86-32-bit
thanks
More information about the Gcc-help
mailing list