[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#443576: Strict aliasing problem



"Phil Endecott" <phil_dekje_endecott@chezphil.org> writes:

>> I think I found a bug in gcc-4.2
>
>> int i, j;
>> printf("%d %d\n", j, (void *)(j));
>
> This looks like a strict-aliasing issue to me; you're casting from an
> int to a void*, which is undefined.

Casting from int to void* is not undefined, but implementation
defined. Also, this clearly has nothing to do with aliasing, since
aliasing is about accessing objects using an lvalue of a bad type, and
not about casting.

I would rather guess this is the same problem as #440545 (caused by a
bug in SCEV).

-- 
	Falk




Reply to: