Source-Changes-D archive

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

Re: CVS commit: src/sys/arch/atari/stand/installboot



On Nov 24,  4:55am, tsutsui%ceres.dti.ne.jp@localhost (Izumi Tsutsui) wrote:
-- Subject: Re: CVS commit: src/sys/arch/atari/stand/installboot

| > Yes, taking this approach to the extreme we should never switch compilers.
| 
| Please stop such "extreme or nothing" approach if you cannot maintain it.

Ok, it is because I feel that all this discussion has gotten out of proportion.

| Could you read and answer my another post?
|  http://mail-index.netbsd.org/source-changes-d/2014/11/23/msg007400.html
| 
| Taylor claims the existing abcksum() also violates aliasing rule.
|  http://mail-index.netbsd.org/source-changes-d/2014/11/23/msg007402.html
| 
| If he is correct it's no sense to tweak only functions complained
| by current gcc48.

Yes, both solutions (your post and the existing checksum function
(with our without my changes)) violate strict aliasing rules since
they go from uint8_t * -> void * -> uint16_t *. Currently this
works with gcc and there are no warnings, but it is not safe.  The
sanctioned solutions are to use unions of the memory block types
or memcpy().

christos


Home | Main Index | Thread Index | Old Index