pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: consider -Wmissing-variable-declarations
Date: Sat, 21 Feb 2026 13:31:25 -0500
Message-ID: <3109540.1771698685@sss.pgh.pa.us> (raw)
In-Reply-To: <972b0257-00fe-4758-a01b-94918ea34ea6@eisentraut.org>
References: <e0a62134-83da-4ba4-8cdb-ceb0111c95ce@eisentraut.org>
	<69d9824f-00ea-49b6-b68d-96f0806ec454@iki.fi>
	<acdbdd0c-c91a-4687-9751-ec2d1c3df064@eisentraut.org>
	<5cf9f601-a9e7-48ed-a007-714209e9779f@eisentraut.org>
	<20240618150238.hm6tr4prhe7porhq@awork3.anarazel.de>
	<f39c1137-1d5e-4aac-99f6-361ff9444f7b@eisentraut.org>
	<6070f0ee-176f-4e78-9324-3bbb70a191f9@eisentraut.org>
	<d8661429-8dec-4d05-808f-4975491ff46a@eisentraut.org>
	<228700.1722717983@sss.pgh.pa.us>
	<972b0257-00fe-4758-a01b-94918ea34ea6@eisentraut.org>

Peter Eisentraut <peter@eisentraut.org> writes:
> On 03.08.24 22:46, Tom Lane wrote:
>> Various buildfarm animals are complaining about
>> g++: error: unrecognized command line option "-Wmissing-variable-declarations"; did you mean "-Wmissing-declarations"?
>> It looks like we are passing CFLAGS not CXXFLAGS to this particular
>> g++ invocation.

> Changing this seems to have done the trick.

I noticed that relatively-new BF animal siren has been failing build
in the pre-v18 branches, with symptoms very much like the above:

g++ -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-cast-function-type-strict -g -O2  -Wno-deprecated-declarations -fPIC -fvisibility=hidden -shared -o llvmjit.so  llvmjit.o llvmjit_error.o llvmjit_inline.o llvmjit_wrap.o SectionMemoryManager.o llvmjit_deform.o llvmjit_expr.o -L../../../../src/port -L../../../../src/common    -Wl,--as-needed -Wl,-rpath,'/home/linux1/20-siren/buildroot/REL_17_STABLE/inst/lib',--enable-new-dtags  -fvisibility=hidden -L/usr/lib64 -lLLVM 
g++: error: unrecognized command line option "-Wcast-function-type"; did you mean "-Wbad-function-cast"?

Evidently this is because 365b5a345 was not back-patched, so we're
passing CFLAGS selected for clang to g++.

I certainly wouldn't suggest that this is worth breaking release
freeze for, but I think we should back-patch once the freeze
is over.

			regards, tom lane





view thread (13+ messages)

Message-ID: <3109540.1771698685@sss.pgh.pa.us>
Permalink:  ../3109540.1771698685@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3109540.1771698685@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter@eisentraut.org, hlinnaka@iki.fi, andres@anarazel.de
  Subject: Re: consider -Wmissing-variable-declarations
  In-Reply-To: <3109540.1771698685@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox