Skip site navigation (1) Skip section navigation (2)

Re: [PATCH] Compile without warning with gcc's -Wtype-limits, -Wempty-body

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Compile without warning with gcc's -Wtype-limits, -Wempty-body
Date: 2013-01-15 01:39:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, 2013-01-15 at 00:29 +0100, Andres Freund wrote:
> Independently from this patch, should we add -Wtype-limits to the
> default parameters?

I think we have had a discussion along this line before.  I am against
fixing warnings from this option, because those changes would hide
errors if a variable's type changed from signed to unsigned or vice
versa, which could happen because of refactoring or it might be
dependent on system headers.

FWIW, clang has the same warning on by default.  There, it's called

I'm less concerned about -Wempty-body, but I can't see the practical use
either way.

In response to


pgsql-hackers by date

Next:From: Andres FreundDate: 2013-01-15 01:43:20
Subject: Re: [PATCH] Compile without warning with gcc's -Wtype-limits, -Wempty-body
Previous:From: Andres FreundDate: 2013-01-15 01:38:45
Subject: logical changeset generation v4

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group