Re: msvc const warnings - Mailing list pgsql-patches

From Magnus Hagander
Subject Re: msvc const warnings
Date
Msg-id 46A65387.1090904@hagander.net
Whole thread Raw
In response to Re: msvc const warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: msvc const warnings  (Andrew Dunstan <andrew@dunslane.net>)
Re: msvc const warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Gregory Stark <stark@enterprisedb.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?

//Magnus


pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: tsearch core path, v0.58
Next
From: Andrew Dunstan
Date:
Subject: Re: msvc const warnings