Adriaan van Os wrote:
The same remarks apply for
theBytePtr:= BytePtr( theIntPtr); IntPtr( theBytePtr):= theIntPtr; {testcast.pas:14: warning: cast increases required alignment of target type}
but then the other way round.
It's more tricky to suppress the warning here since at the time the cast is built, the compiler doesn't know whether it will be used on the LHS or RHS. And since there's an easy alternative (RHS cast) available which is even preferable (LHS casts generally are a strange beast) and a compiler directive to turn of the alignment warnings, I don't think we need to bother.
OK, but I suggest to change the wording to "cast may increase required alignment of target type".
I understand what you aim at, but the suggested wording may not be quite accurate -- the alignment is increased in any case, but whether that's bad or not depends on the situation, hmm ... Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8