Consider the following code that starting with GCC 4.1.0 generates
'dereferencing type-punned pointer will break strict-aliasing rules'
warning:
~ cat test.c
struct inner {
struct inner *next;
};
struct outer {
struct inner base;
int value;
};
/* List of outer elements where all
On May 15, 2006, at 8:56 AM, Igor Bukanov wrote:
Consider the following code that starting with GCC 4.1.0 generates
'dereferencing type-punned pointer will break strict-aliasing rules'
warning:
Yup. Kinda does seem a flaw in the C language. You could switch to C
++. :-)
~ cat test.c