Re: [HACKERS] compile warnings in CVS HEAD?
On Thu, 2003-09-04 at 13:14, Kurt Roeckx wrote: tablecmds.c: In function `validateForeignKeyConstraint': tablecmds.c:3546: warning: dereferencing type-punned pointer will break strict-aliasing rules So, what should we do with this? The recommended way to deal with is to put them into a union. Yuck... Other ways to deal with the problem include using -fno-strict-aliasing or -Wno-strict-aliasing (to disable the optimization itself and to disable the warnings about it, respectively). -Neil ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] compile warnings in CVS HEAD?
Neil Conway writes: On Thu, 2003-09-04 at 13:14, Kurt Roeckx wrote: tablecmds.c: In function `validateForeignKeyConstraint': tablecmds.c:3546: warning: dereferencing type-punned pointer will break strict-aliasing rules So, what should we do with this? Rumor has it that many of these warnings are bogus. But I wouldn't want to turn them off altogether because that might hide real problems. At this point, I think we should wait a while until the compiler becomes more mature. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [HACKERS] compile warnings in CVS HEAD?
On Mon, Sep 15, 2003 at 08:09:22PM +0200, Peter Eisentraut wrote: Neil Conway writes: On Thu, 2003-09-04 at 13:14, Kurt Roeckx wrote: tablecmds.c: In function `validateForeignKeyConstraint': tablecmds.c:3546: warning: dereferencing type-punned pointer will break strict-aliasing rules So, what should we do with this? Rumor has it that many of these warnings are bogus. But I wouldn't want to turn them off altogether because that might hide real problems. At this point, I think we should wait a while until the compiler becomes more mature. I agree to that. Kurt ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [HACKERS] compile warnings in CVS HEAD?
On Mon, Sep 15, 2003 at 08:09:22PM +0200, Peter Eisentraut wrote: Neil Conway writes: On Thu, 2003-09-04 at 13:14, Kurt Roeckx wrote: tablecmds.c: In function `validateForeignKeyConstraint': tablecmds.c:3546: warning: dereferencing type-punned pointer will break strict-aliasing rules So, what should we do with this? Rumor has it that many of these warnings are bogus. But I wouldn't want to turn them off altogether because that might hide real problems. At this point, I think we should wait a while until the compiler becomes more mature. Bother - I'm just upgrading from 2.95.3 to 3.3.1 as this will be default on NetBSD :/ Patrick ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] compile warnings in CVS HEAD?
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
Re: [HACKERS] compile warnings in CVS HEAD?
Neil Conway writes: lex.Int_yy.c:1832: warning: no previous prototype for `Int_yyget_lineno' These are caused by the new flex. Ignore them. tablecmds.c: In function `validateForeignKeyConstraint': tablecmds.c:3546: warning: dereferencing type-punned pointer will break strict-a liasing rules Probably the new compiler. These might deserve some investigation. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [HACKERS] compile warnings in CVS HEAD?
Neil Conway [EMAIL PROTECTED] writes: I'm seeing the following with the current CVS code on my Linux dev box: In file included from bootparse.y:340: lex.Int_yy.c:1832: warning: no previous prototype for `Int_yyget_lineno' lex.Int_yy.c:1841: warning: no previous prototype for `Int_yyget_in' ...etc... These are flex's fault. AFAICT flex 2.5.31 is a long way short of being production quality. I recommend reverting to 2.5.4. 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. regards, tom lane ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings