On Jul 4, 2009, at 6:33 PM, Wolfgang Denk wrote:
> Dear Kumar Gala,
>
> In message
> <[email protected]> you wrote:
>> When building the MPC8572DS_config w/gcc-4.4 I get:
>>
>> sys_eeprom.c: In function ‘do_mac’:
>> sys_eeprom.c:323: warning: dereferencing type-punned pointer will >
>> break strict-aliasing rules
> ...
>> Should would be turning on -fno-strict-aliasing. The linux kernel
>> has >
>> been doing this for some time.
>
> Should we not rather fix the code that causes these warnings? Usually
> the required changes are just minimal (which does not mean that it is
> a trivial task).
For some cases its trivial, for others I'm not sure if its worth it
(like ahci.c):
static int ata_scsiop_read_capacity10(ccb *pccb)
{
u8 buf[8];
memset(buf, 0, 8);
*(u32 *) buf = le32_to_cpu(ataid[pccb->target]->lba_capacity);
buf[6] = 512 >> 8;
buf[7] = 512 & 0xff;
memcpy(pccb->pdata, buf, 8);
return 0;
}
how do we fix this (the *u32 *)buf ... line is the one causing
warnings ?
For dlmalloc I think we might want to look at updating to a newer
version of the code.
- k
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot