Re: Flags -g and -O give very different results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Any pointers for how to track this sort of thing down? What kind of things should I look for?

Mostly casts from one pointer type to another (you probably can
ignore void* and char* though).

Things like

long f(int *x) {
	return *(long *)x;
}

are the most common problems.  So,

	*(<some type> *)<some data address>

[there are more subtle things as well -- but almost all of the
time, the problem is gross implicit violation of the C99 data
aliasing rules).


Segher


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux