"mark at codesourcery dot com" <[EMAIL PROTECTED]> writes: | ------- Comment #22 from mark at codesourcery dot com 2006-10-04 05:39 ------- | Subject: Re: [4.0/4.1/4.2 Regression] placement new | does not change the dynamic type as it should | | ian at airs dot com wrote: | > ------- Comment #21 from ian at airs dot com 2006-10-03 23:44 ------- | > In C a general allocation function should work with a char array. A specific | > allocation function should use a union. I don't think there are many existing | > exceptions to these guidelines. | | > So I don't see a serious problem in C either. Am I missing something/ | | I think there are two remaining issues: | | int i; | *(float*)(&i) = 7.0; | | IIUC, Mike's position is that this is valid -- and that, in fact, after | this point "i" can no longer be accessed as an int. Do you agree?
I don't see how that code is supported by the paragraphs quoted by Mike. There was a recent discussion (at most two weeks ago) on the C++ standard reflector -core about similar topic. I do agree with Mark that the proper way to resolve this is to go to the C++ committee. It would be incredible that C++ was less type-strict than C. -- Gaby