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 1w679m-003xxR-2G for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 13:23:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w679l-009see-0E for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 13:23:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w679k-009seW-2T for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 13:23:21 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w679i-00000001Tyc-0KIM for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 13:23:20 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4853e1ce427so25170805e9.3 for ; Fri, 27 Mar 2026 06:23:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774617797; x=1775222597; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=t/GWQ30YMy/fi1iElIQNXVVkHqi/mgwTC/z1OHLA03o=; b=BuBUqTmDqp0ScuPa8GkgJ27W+JBJZ1iBsVjuyNOP5kU7FydnTMGqLori6xU9ldpDS5 Y3YpdjBLjtLyn+gMlkC1ndxKblCFz5igClMMyeiBmowc9bXL1H/91x2nbdQBkJRpk2Ox JnIRB3B4yMMhATzDrp7KiSaZ2nRa7WKybCVhA7rTnaSZ2rpudqwDzR6htTFw7qlu7V8g lMkskR4AINGgIpQGdZK4MDzRHBcfedYKOVpXCJ7nF+U8mctLRdE7bscPdRhf73ptEVvx Hp5pDS3xtb2yVV/LCFy1HHz66InMlkKO1vUnvdwEMxggARWj/208c5+JXQuuTqw2ZNXF 5J+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774617797; x=1775222597; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t/GWQ30YMy/fi1iElIQNXVVkHqi/mgwTC/z1OHLA03o=; b=OYbatwLeek4D7H5+QG13PNlHmlBLBgSKfZWmhXamdEGP5Rswbu8xY62viaNP3REV9h nFlG/MkBQgPZ1nD5PqNspcooEf0a1aNlhebgW1UcSChsDIJ7B9GeU9/ukoEAF81pczgD 6xpNmCOY/Iq+MSwizdl5TaJkE1GoMw/dFbYVrZjkedLG37ENnYeuOiyFixYS64usGO+G o+aoV+mReWS8jflBEZOLS7zsfFRiIQg5V2IL2Da7zuyiAjS2NPuou08bdagee0AaMcBn aj7v5iCTmIoTQNgFhCNakEOptJ00pYbSwpiaQnyjbtBGJnMYiVVyzyr7v4X0ZqY5kGt+ 0uPw== X-Gm-Message-State: AOJu0YybI+y9UC+7aMo+FXwyRJwCEgoj9Djd/Wh+l2+sI3K0kU3dLyyR MtCTLaxBneAzBEh2m4vPlN8LdOi1luEXiBp+U5x7SvhC8Y7aPi0wW8ZjWrQSbg== X-Gm-Gg: ATEYQzxXTIlOu7eqCfXfy/J1TCMw6Wx9ajazLtH3Tp5t/BQPKUB+lJGSPVikrJqOumk LzU0dKXpSH7mfsIxK/Tw5a5KkbFnXXgf0pm/+6KUB8jowJSvaagCRfrPvgMetcumrCo9lundsm1 0Gyqu5nJNMNlXWSiD2jsIF8U0B3Z32xA2k4FVITHkRqVr+VeJG1Or6xQniqHgOrHla882KV7vkT 3oxEktLn8KenPVN0KeGFP4ultQTbsJLj+Q9z0O/V/KZm4dq5My1ljLeWw8HgPKUfv5uBA7R0ocj iqMNzjpWQuE8mXKvW9XBdPNOneFIYrMplOCPiUB1aiOsy73rR8T3PcxZZGDgXDbhAHsiSlEoCH+ ONZw8TAwLBSvAqJzpU1vog8Q+CNqhJ2WynQDT3E2jUJS6NtiifIjkrHeQGSJBE47ftj03OoqvZS DYb+HZJgPfBqWEoGvutOzbWkTbB87DlyYWJZ1yflJeOiI+KCo2FjQNDIQGe88NBQHTN3J5oYtYE rm0bRM1GOg3b1lcnAJWJD8XOj9PLVxMKNsum3ZIL8U+n2VJUYsthE4lG17pp+LVl0oL X-Received: by 2002:a05:600c:6487:b0:487:1c2:6a4c with SMTP id 5b1f17b1804b1-48727d6790dmr40631055e9.4.1774617796626; Fri, 27 Mar 2026 06:23:16 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48727189cd1sm15545905e9.29.2026.03.27.06.23.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2026 06:23:16 -0700 (PDT) Date: Fri, 27 Mar 2026 13:23:14 +0000 From: Bertrand Drouvot To: Peter Eisentraut Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Enable -Wstrict-prototypes and -Wold-style-definition by default Message-ID: References: <44885d54-0376-46b3-b574-59e0e3098580@eisentraut.org> <4ab608af-2f90-47d8-88a5-6329f6630fff@eisentraut.org> <7bf60ab1-2b5d-4a77-93ce-815072a0a014@eisentraut.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Tf7PCX808vMWq/ju" Content-Disposition: inline In-Reply-To: <7bf60ab1-2b5d-4a77-93ce-815072a0a014@eisentraut.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Tf7PCX808vMWq/ju Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com --Tf7PCX808vMWq/ju Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-configure-Apply-Werror-vla-to-C-as-well-as-C.patch"