Re: Re: RELEASE STOPPER? nonportable int64 constants in pg_crc.c

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: RELEASE STOPPER? nonportable int64 constants in pg_crc.c
Date: 2001-03-22 03:49:50
Message-ID: 200103220349.WAA03734@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Can we use (long long) rather than LL?

> > Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at> writes:
> > > Recent changes in pg_crc.c (64 bit CRC) introduced non portable constants of the form:
> >
> > > -c -o pg_crc.o pg_crc.c
> > > 287 | 0x0000000000000000, 0x42F0E1EBA9EA3693,
> > > ............................a..................
> > > a - 1506-207 (W) Integer constant 0x42F0E1EBA9EA3693 out of range.
> >
> > Please observe that this is a warning, not an error. Your proposed
> > fix is considerably worse than the disease, because it will break on
> > compilers that do not recognize "LL" constants, to say nothing of
> > machines where L is correct and LL is some yet wider datatype.
>
> I am seeing the same warnings with gcc 2.7.2.1 -Wall on BSDi i386:
>
> pg_crc.c:353: warning: integer constant out of range
> pg_crc.c:353: warning: integer constant out of range
> pg_crc.c:354: warning: integer constant out of range
> pg_crc.c:354: warning: integer constant out of range
> pg_crc.c:355: warning: integer constant out of range
> pg_crc.c:355: warning: integer constant out of range
> pg_crc.c:356: warning: integer constant out of range
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> + If your life is a hard drive, | 830 Blythe Avenue
> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 2001-03-22 03:51:08 Re: BufferSync() & FlushRelationBuffers() conflict
Previous Message Bruce Momjian 2001-03-22 03:47:43 Re: Re: RELEASE STOPPER? nonportable int64 constants in pg_crc.c