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

Re: [MiNT] How serious is GCC "cast increases requiered alignment of target type" warning?



"Ole Loots" <ole@monochrom.net> writes:

> Hello, I'm getting the warning: cast increases requiered alignment of
> target type when compiling code for 32bpp graphics surface... As I know
> old 68000 CPU's did throw an exception when accessing unalgined memory,
> I'm in doubt if I should care... the prduced binary should be used with
> Coldfire / 68030 CPU (which allows unalgined memory access?), so I believe
> I can ignore this warning, or is it fatal to ignore it?

Even if unaligned access are possible the compiler can and does assume
that all accesses are aligned (unless told otherwise).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."