cvs commit: src/lib/libalias alias.c
David Schultz
das at FreeBSD.ORG
Tue Jul 6 19:26:15 PDT 2004
On Tue, Jul 06, 2004, Dag-Erling Smorgrav wrote:
> Rewrite twowords() to access its argument through a char pointer and not
> a short pointer. The previous implementation seems to be in a gray zone
> of the C standard, and GCC generates incorrect code for it at -O2 or
> higher on some platforms.
I don't think this is even a gray zone---the C standard
specifically disallows aliasing of pointers to different types
unless one of the types is a 'char *'.
More information about the cvs-src
mailing list