Re: [PATCH 6/6] [POWERPC] make struct property's value a void *
From: David Miller <davem@davemloft.net>
Date: 2007-04-09 23:17:22
From: David Miller <davem@davemloft.net>
Date: 2007-04-09 23:17:22
From: Paul Mackerras <redacted> Date: Tue, 10 Apr 2007 04:20:22 +1000
This is true according to the standard (as I understand it), and also a classic example of the C standards committee stuffing up the C language by trying to turn it into a "high-level" language. From the earliest days of C on the PDP-11 it was understood that memory was an array of bytes which could be addressed and interpreted in any way the programmer chose. For systems programming tasks that is a very useful facility, and one which the kernel code generally assumes. It's a pity IMHO that the committee chose to throw that away (and yes I understand that throwing it away makes more optimization opportunities available).
To be honest I think they did the right thing. 99,999,999,999 times out of 100,000,000,000 independant pointers do not alias each other at all. But regardless of what one thinks, we don't enable strict aliasing in the kernel build anyways, so none of this even matters for us.