User Tools

Site Tools


gcc:gcc_and_friends

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

gcc:gcc_and_friends [2011/02/17 16:01] – created devagcc:gcc_and_friends [2012/02/08 08:32] (current) deva
Line 4: Line 4:
 See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12076 \\ See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12076 \\
 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__));
 +</code>
gcc/gcc_and_friends.1297954877.txt.gz · Last modified: 2011/02/17 16:01 by deva