gcc:gcc_and_friends
Differences
This shows you the differences between two versions of the page.
| gcc:gcc_and_friends [2011/02/17 16:01] – created deva | gcc:gcc_and_friends [2012/02/08 08:32] (current) – deva | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| See: http:// | See: http:// | ||
| Add: -fno-elide-constructors as well as -fprofile-arcs -ftest-coverage to the compile line to partially fix this. | Add: -fno-elide-constructors as well as -fprofile-arcs -ftest-coverage to the compile line to partially fix this. | ||
| + | |||
| + | =====Packing of a struct===== | ||
| + | Force space used to be minimised to the actual sizes of the datatypes. Char might use up 4 bytes to get 4 byte alignment if the struct is not packed in order to gain a performance boost when adressing its contents. | ||
| + | <code c> | ||
| + | struct header { | ||
| + | char a; | ||
| + | int b; | ||
| + | double c; | ||
| + | } __attribute__ ((__packed__)); | ||
| + | </ | ||
gcc/gcc_and_friends.1297954877.txt.gz · Last modified: by deva
