Actions
Bug #7673
closedWrong transformation with type conversion
Start date:
11/02/2016
Due date:
% Done:
0%
Estimated time:
Detected in build:
svn
Platform:
Linux x64
Published in build:
Description
CIF transforms
u8 *dst; *(u16 *)(dst + 4)
to *((u16 *)dst + 4U)
with different meaning: first has offset 32 from dst, second has offset 64 from dst.Source code is attached.
It seem that the same problem occurs with:
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#define to_usb_device(d) container_of(d, struct usb_device, dev)
static inline struct usb_device *interface_to_usbdev(struct usb_interface *intf)
{
return to_usb_device(intf->dev.parent);
}
CIF omits conversion (char *)__mptr
__inline static struct usb_device *interface_to_usbdev(struct usb_interface *intf )
{
struct device const *__mptr ;
{
__mptr = (struct device const *)intf->dev.parent;
return ((struct usb_device *)__mptr + 0xffffffffffffff70UL);
}
}
Files
Actions