This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Weird optimization bug...?


Hi Adruab,

A bug like that is usually indicative of a buffer overrun.

int rgb[3];
rgb[4] = 7;

Or of cavalier casting.
short hue;
int* p = (int*)&hue;
*p = 0;

Without seeing the code (or some sample code that replicates the bug), it would be difficult to guess less likely scenarios.

HTH,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]