User Tools

Site Tools


gcc:gcc_and_friends

GCC and friends

gcov

Return statements not included

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.

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.

struct header {
  char a;
  int b;
  double c;
} __attribute__ ((__packed__));
gcc/gcc_and_friends.txt · Last modified: 2012/02/08 08:32 by deva