Closed jacquesg closed 6 years ago
Why dont you want to use -fpack-struct
in c++ files?
You very quickly end up with:
warning: ignoring packed attribute because of unpacked non-POD field
In general, IMHO packing a struct should be done on a per struct basis. I understand that this is typically what you want for a small MCU's, but it does make it hard to mix static libraries built with another build system due to the (potential) ABI difference.
@jacquesg that makes sense to me. However who uses unpacked structs? Does it even make sense to not pack structs in c++? In general I'd agree to your argument, but on avr I dont see why you not want to pack structs, especially because we are on an 8 bit system.
How about also adding -fno-threadsafe-statics
to CPP_FLAGS? From what I saw this really makes sense. The option also safes space for my code.
Sounds fair, updated.
nice :)
This adds
-fno-exceptions
for C++ files and makes-fpack-struct
only applicable to C files.