Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7KVD-005Brd-2b for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 21:50:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7KVC-006hDp-0z for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 21:50:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7KVB-006hDe-0u for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2026 21:50:30 +0000 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w7KV9-00000001s4v-3Fh1 for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2026 21:50:28 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 86C827A0137; Mon, 30 Mar 2026 17:50:26 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Mon, 30 Mar 2026 17:50:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm3; t=1774907426; x=1774993826; bh=0aPGJ3x5vRyFPcVqyPwuRHOJqUk7DQzG ZMLYMwzo0cU=; b=KyEZlxuCNKoreGWwk0B4gx+ziYJmYEXtGqmkqDnBUn9v7rZQ O2GHy3kAFYkaNhOC0bWMp3HX4ht+69inGoz6PA6Mox7bii6yxRzR2W0/K6fM7QaH YjjOLBYyqc/AzLBYnafVDKkQnag9NNwIH9ei33QkobNJmtIlyMP/rBt6Bb89ClFP dgRrvtBibu/5oPiCLnUF7txeYky1WtNZw0eobhhRIgz9hkKbrsMYlq/KNpZQHOJl bEIWoKjgn3hnUNvqfK9+3LoVZE9VCzBB9hsRAiOy8kCHVvjNYsSjOPkHOR46+EDe uNRxf/j/FL+nl6sHI+ztKhd4l62lUWZhwqw1cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1774907426; x= 1774993826; bh=0aPGJ3x5vRyFPcVqyPwuRHOJqUk7DQzGZMLYMwzo0cU=; b=5 4YL2m0JRD1IhqYwwkCWSlV4h9hfAOE89vde2/BmLCuzMwepF2CzYTW9nmvqTKKp0 jatkPeckWXvlfRZ0agPF93e7kC1Wxjo3Xo/G8+1/1cND5gRuLP0cRNyU+isoDPgn l8N9KvVf8x+XLQvsgTMDOKjMZP7NNL9IcX5nwwg9SSI7TpYo/hjliQ1Hby/z5x6E F+L3YbFImqlYtA1LEMA3jPF9t+ooM7crTnXg6JEgSYD/jUdqUcqi8LUv6UdT6du4 /ijgkQcyfD+NKgnw6364gnFCffi5ZG+2ZbpTKRBAHMrxTp1ZEo+aDqzbfxU479GD IeRPrkfySEs0dJrF5X5jg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefgedtuddtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejre dttddvjeenucfhrhhomheprfgvthgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhes vghishgvnhhtrhgruhhtrdhorhhgqeenucggtffrrghtthgvrhhnpefgjedthfekfedtue fgieelheetleejgefhueeltdfhueetvdffudekfeejhfegheenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrg huthdrohhrghdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtohepsggvrhhtrhgrnhguughrohhuvhhothdrphhgsehgmhgrihhlrdgtohhmpdhrtg hpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhl rdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 Mar 2026 17:50:25 -0400 (EDT) Message-ID: Date: Mon, 30 Mar 2026 23:50:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Enable -Wstrict-prototypes and -Wold-style-definition by default To: Bertrand Drouvot Cc: pgsql-hackers@lists.postgresql.org References: <44885d54-0376-46b3-b574-59e0e3098580@eisentraut.org> <4ab608af-2f90-47d8-88a5-6329f6630fff@eisentraut.org> <7bf60ab1-2b5d-4a77-93ce-815072a0a014@eisentraut.org> Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 27.03.26 14:23, Bertrand Drouvot wrote: > Hi, > > On Fri, Mar 27, 2026 at 01:15:29PM +0100, Peter Eisentraut wrote: >> On 27.03.26 11:07, Bertrand Drouvot wrote: >>> That looks ok but I wonder if we should also add '-Werror=vla' to it ( >>> and remove it from common_warning_flags) to be in sync with what configure.ac >>> is doing: >>> >>> " >>> PGAC_PROG_CC_CFLAGS_OPT([-Werror=vla]) >>> # -Wvla is not applicable for C++ >>> " >> >> Hmm. This comment is not actually fully correct. With g++, you can write a >> VLA and it will work, and also -Wvla will warn about it. So we should >> actually add that option to C++ as well. (It is true that VLAs are not in >> standard C++, and g++ with -pedantic will also warn about it.) > > Oh right, just did a few tests and agree with your comment above. I agree that > it should also be added for C++ in autoconf then. > > What about the attached? > > That said, your patch LGTM given that the VLA remark was not appropriate. Ok, both committed.