On Wed, Sep 03, 2003 at 10:30:05PM -0400, Tom Lane wrote: > > > tablecmds.c: In function `validateForeignKeyConstraint': > > tablecmds.c:3546: warning: dereferencing type-punned pointer will break > > strict-aliasing rules > > Hm. Got any idea what these are really complaining about? I see no > such gripes with the gcc versions I use, but I wouldn't be surprised > if gcc 3.3 is trying to tighten up.
It's about optimisation. The compiler is free to assume that 2 pointers of a different type never point to the same variable. It basicly happens when you cast a pointer of 1 type to an other. See the gcc info page for a little more information. The recommended way to deal with is to put them into a union. Kurt ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings