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

Bug#443576: Strict aliasing problem



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. Did you get any warnings? (Did you compile with warnings enabled? -Wstrict-aliasing?) Investigate the -f[no]strict-aliasing options.

Regards,

Phil.








Reply to: