On 5/22/12 4:05 PM, Steven Schveighoffer wrote:
On Tue, 22 May 2012 15:29:10 -0400, Andrei Alexandrescu
<[email protected]> wrote:
On 5/22/12 1:14 PM, Steven Schveighoffer wrote:
I agree, it's unsound. But so is this:
int *blah = void;
*blah = 5;
It doesn't mean that the language should forbid it, or that the compiler
isn't implemented as designed.
Initialization with void is a feature. My example shows the fail of a
feature. There is no comparison.
Your example shows an invalid use for a feature. There are valid uses
for that feature that are not unsound.
Typing must always be sound.
Andrei