Re: [HACKERS] integer overflow in reloption.h

2009-05-24 Thread Tom Lane
Zdenek Kotala writes: > 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 compi

[HACKERS] integer overflow in reloption.h

2009-05-22 Thread Zdenek Kotala
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 ==