0x7CFE/llst

Fix code which may break strict aliasing rules

0x7CFE opened this issue · 1 comments

FreeBSD complains that cast in TArray::operator[] may break aliasing rules due to access through badly aliased pointers. Linux port of GCC on the other hand do not complain. However we need to eliminate this potential problems.

  • Define fields and bytes as union in TObject
  • Fix TArray<T>::operator[]
  • Fix hptr<TArray<T>>::operator[]

TODO: TArray<T>::operator[] should use static_cast