On Tue, Jan 20, 2004 at 04:13:19AM +0100, Marc A. Lehmann wrote: > On Tue, Jan 20, 2004 at 02:22:57AM +0100, Simon Budig <Simon.Budig@xxxxxxxxxxx> wrote: > > > other parts, and I already had enough with C guts) and is small, it > > > just fits in place with the old code instead of more deep changes. > > > > True. (These "break strict aliasing rules" warnings however are harmless > > according to Yosh.) > > Just a sidenote, unless caused by a bug in the compiler, these warnings > are never harmless. They might not cause problems with current gcc, > but there is no guarentee that the code will do as expected with other > compilers or future versions of gcc, unless one uses -fno-strict-aliasing, > which can be a major performance problem in some cases. Well, the bulk of the code in gimp that causes warnings is stuff like: void foo (void **p); void bar (void) { int *i; foo ((void **) &i); } While it does break the letter of the law wrt aliasing rules, are there any assumptions that the compiler can legally make that would cause problems? -Yosh