integer overflow in reloption.h

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: integer overflow in reloption.h
Date: 2009-05-22 20:08:42
Message-ID: 1243022922.1596.7.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

When I compile postgresql now I get following message:

"../../../src/include/access/reloptions.h", line 45: warning: integer
overflow detected: op "<<"

The problem is on the following lines

typedef enum relopt_kind
{
...
RELOPT_KIND_MAX = (1 << 31)
}

enum is int datatype and 1 << 31 == -2147483648. It is reason why
compiler (sun studio) complains.

Is possible to change it to 1 << 30 to stop compiler generates noise?

Thanks Zdenek

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2009-05-22 20:17:09 Re: Revisiting default_statistics_target
Previous Message Pavel Stehule 2009-05-22 19:41:00 Re: [PATCH] 8.5 plpgsql change for named notation: treat word following AS keyword as label v2