On 12 November 2006 04:16, Howard Chu wrote:

> Dave Korn wrote:
>> On 12 November 2006 03:35, Howard Chu wrote:
>> 
>> 
>>> If we go through the temporary variable v, there's no warning. If we
>>> don't use the temporary variable, we get the "might break" message.
>>> 
>> 
>>   Try
>> 
>> 
>>>         f = (struct foo *)(void *)buf;
>>> 
>> 
>> 
> That's good, but why is it safe?


  Passing through void* means gcc has to assume it could alias anything,
IIUIC, as a result of the standard allowing implicit void*<=>T* conversions.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

Reply via email to