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

Re: msvc const warnings

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>,pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: msvc const warnings
Date: 2007-07-25 10:51:14
Message-ID: 20070725105114.GG5612@svr2.hagander.net (view raw or flat)
Thread:
Lists: pgsql-patches
On Tue, Jul 24, 2007 at 09:43:51PM +0200, Magnus Hagander wrote:
> Tom Lane wrote:
> > Magnus Hagander <magnus(at)hagander(dot)net> writes:
> >> Tom Lane wrote:
> >>> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> >>>> Can we just disable const checking for MSVCC in general without using the
> >>>> #pragmas? It clearly doesn't understand how const works making that warning
> >>>> from it useless.
> >>> +1 ... any useful warning of this kind will be had from other compilers.
> > 
> >> Sure, there are a couple of places we can do it:
> >> 1) We can add the pragma at the top of the file, which will turn it off
> >> for that file, but keep it for other files.
> >> 2) We can turn it off on a per-project basis, meaning we turn it off for
> >> the entire backend and the entire psql, but not for other EXEs and DLLs.
> >> 3) We can just turn it off for everything
> > 
> >> Note that it'll of course turn off the warning in *all* cases, not just
> >> the "free const chra **"-one.
> > 
> >> Which way would be preferred?
> > 
> > Turning it off globally is what I had in mind, and I assume Greg too.
> > The point is that if MSVC gets this case wrong, then it probably gets
> > many other cases wrong, and we shouldn't have to work around them one
> > at a time.
> 
> ok. I'll do it globally when I'm back at a box where I can rebuild the
> thing fast enough not to get bored :-) Meaning tomorrow.

Done.

//Magnus

In response to

pgsql-patches by date

Next:From: Magnus HaganderDate: 2007-07-25 11:37:59
Subject: Re: patch win32.mak of libpq
Previous:From: Magnus HaganderDate: 2007-07-25 10:28:23
Subject: Re: plperl warnings on win32

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