This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Flags -g and -O give very different results
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