Re: [HACKERS] more compile warnings

2002-12-09 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > You would think that would catch it. My problem is that I am compiling > > with -O0, because I compile all day and I don't care about optimization. > > You should reconsider that. At -O0 gcc doesn't do any flow analysis, > and thus

Re: [HACKERS] more compile warnings

2002-12-07 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > You would think that would catch it. My problem is that I am compiling > with -O0, because I compile all day and I don't care about optimization. You should reconsider that. At -O0 gcc doesn't do any flow analysis, and thus you lose many important warn

Re: [HACKERS] more compile warnings

2002-12-06 Thread Jeroen T. Vermeulen
On Fri, Dec 06, 2002 at 11:16:30PM -0500, Bruce Momjian wrote: > > I use: > > -Wall -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wcast-align Some other useful ones are -pedantic -W -Wfloat-equal -Wshadow -Wcast-qual -Wwrite-strings -Wconversion -Wsign-compare -Wsign-promo. >

Re: [HACKERS] more compile warnings

2002-12-06 Thread Bruce Momjian
Dann Corbit wrote: > Instead of just assigning a value, it means it is conceivable that a > path allows undefined behavior. Example: > > ... > int y; > if (x < 5) >y = 3; > if (x > 5) >y = 1; > > What happens if x == 5? Then y is indeterminate. > Sometimes, the flow analysis just g

Re: [HACKERS] more compile warnings

2002-12-06 Thread Dann Corbit
> -Original Message- > From: Bruce Momjian [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 06, 2002 7:58 PM > To: Joe Conway > Cc: [EMAIL PROTECTED]; PostgreSQL-development > Subject: Re: [HACKERS] more compile warnings > > > Rod, can you comment on

Re: [HACKERS] more compile warnings

2002-12-06 Thread Bruce Momjian
Rod, can you comment on these warnings Joe Conway's compiler is showing? I don't see the warnings with gcc, but clearly they look like problems. I can just assign a NULL on definition, but I thought you should take a look. -