> On Sun, Jun 29, 2008 at 08:19:05PM +0100, Sjoerd Simons wrote:
> > *((uint64_t *) h) = (uint64_t) 0;
> > *((uint32_t *) h) = (uint32_t) 0x;
>
> Violation of aliasing rules. h points either to a uint32_t oder uint64_t
> not both.
>
> > With -fschedule-insns -fstrict-aliasing:
> > $ /
Package: gcc-4.3
Version: 4.3.1-2
Severity: serious
When using the following (somewhat contrived code):
--
#include
#include
#include
#include
void
misc (uint8_t **header)
{
uint8_t *h;
h = malloc(8);
*((uint64_t *) h) = (uint64_t) 0;
*((uint32_t *) h) = (uint32_t) 0x;
2 matches
Mail list logo