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 1vzddU-001BQn-1s for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Mar 2026 16:39:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vzddS-00HVZr-37 for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Mar 2026 16:39:15 +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 1vzddS-00HVZg-1O for pgsql-hackers@lists.postgresql.org; Mon, 09 Mar 2026 16:39:15 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vzddP-00000001JNL-1lWZ for pgsql-hackers@lists.postgresql.org; Mon, 09 Mar 2026 16:39:14 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4852f8ac7e9so27880245e9.1 for ; Mon, 09 Mar 2026 09:39:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773074350; x=1773679150; darn=lists.postgresql.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=UoC+eTDv9xycc9F1tjJiClVarzOuyqysGvF0KMYHi/M=; b=Ty7W0XN4OR5B3vT7LXBkkqAd8ngMB35Ef6I4ZAWNwKlhRCI1r2XxMnB8hVSbij8jLX icsd6eoNnz+LhFVqWn9ZaFeGb3YeHLPTohFbZhINPAdMQTSdkrfQO27NdXd9oC9y7vvN GvYTNcf4wWhtyjjQZqRVkr9IG9nlH1U0SJoe9opymwLX3VQGfj23ew+pPvth1EaecJSO qAk+JZgoLYYoMslJGD0MSrt7vt1+2cdji7omz6gV4SrlplZkK31MOc20toxB37cwI0LI EeId9sTpxwIT4HJps7OXYLhDkAhojiC57uFIehypKxh99M24i8nrBrMiD45IOfBDVvkl uKBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773074350; x=1773679150; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UoC+eTDv9xycc9F1tjJiClVarzOuyqysGvF0KMYHi/M=; b=kEuLdm2iGAIFhhMkd8wL+f0jygBmZ+7RRt0MYDojnC5uxSaQkeOkGUQ6+0UE+q0He1 b6DxuJijnuLk2tbshvVnPVvlGyWRwNUTZlIvTKZItDOjrOhQV0cgGVNxcg/OsCfj3Vbb 7GnJkrcRT7VPA6iOY/3G6/a6UW2D39lorPn/CnD5qpX2QLHvJF2wK1oHcbLg3YGyYfQA fn73hMw3Ca9O9NPYR1PDm+OONByhl8YypptH1gW1itxon6pLxD9Me1m/XEbhaiNlpRUW u0bgX1BknT3LOGTV5A8dchKI9MkiPislFHfzD7k28pvuLUd5EQoh3RMFY1UMSsNeAiL9 cOfg== X-Gm-Message-State: AOJu0Yypx8X4scCqngP9ntBypP9ioRK8jEFxr5d40Y9S9pyq6VXLuvQa PviFqvNkADFCj6CfHW6yMHNMkTYi+OIXYezqGu1plcBjvR2EvV38Vhi0FhrlkQ== X-Gm-Gg: ATEYQzwfs08PLl/RW0dVN9r8rtimlI7+r/nPaChMkyRC9r6Qqb0YOCJbhLCS/Nz1fNJ zGgVfRC/YuTH+b7RqhGff4laN8aPsWLxhRObpCBFVsUmGdj2gpcsFJUJ1sehbBgJmV0SkVYSUpX b7W3FyqV4QYglhhijKQLLWunP+Q6ojPkXC6cnietW+6jBw+CP73ydq7ThhOa9+8zL9VCCoW8Fyz 491pQ4RIHOYZ+jdCDwXV3Wj4RJBqH3NxQV1yP1NlV1wfOOuEbWNUYp5lzdoQU3mFyRXcZ5xDnu9 c9jxL9/LvJlanHsyrmtI1aHmACQ9h4MfZQGCjJkXxvg7Cdumreqys1IzXp1PH7v3X0aiqaXFyOz JBJGOyYviubueT0KIGMCwfNo7TF6riSgHdL9sfD8ON9J5Fn20R2NaC5MdXLtw7NVeWdU6xmFYbt ndMMqjbYLwBe15LmHzdGlhJjQXx40xp8T5twNvZs28BQzwCQMV8veOCFCPybMQtdFx9uPHkFwnW WnuSulfeVXBKpvJmIUWePuOi2wpHjSWL1r8s2Q6zMTCA7wUmJKu6CYQHQ== X-Received: by 2002:a05:600c:3e87:b0:485:3e00:9440 with SMTP id 5b1f17b1804b1-4853e0094acmr42301395e9.24.1773074349584; Mon, 09 Mar 2026 09:39:09 -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-48541b6f6b7sm2293595e9.9.2026.03.09.09.39.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2026 09:39:08 -0700 (PDT) Date: Mon, 9 Mar 2026 16:39:07 +0000 From: Bertrand Drouvot To: pgsql-hackers@lists.postgresql.org Cc: Peter Eisentraut Subject: Enable -Wstrict-prototypes and -Wold-style-definition by default Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="xofE7MYp3i9PRJLn" Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --xofE7MYp3i9PRJLn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi hackers, PFA a patch to $SUBJECT. The idea is to avoid having to chase those warnings manually like 11171fe1fc8, cdf4b9aff2, 0e72b9d440, 7069dbcc31, f1283ed6cc, 7b66e2c086, e95126cf04 and 9f7c527af3 have done. The idea has been discussed in [1] and [2]. The patch is divided in 2 parts: 0001: Prevent -Wstrict-prototypes and -Wold-style-definition warnings It fixes the remaining warnings that those new flags would generate. 0002: Enable -Wstrict-prototypes and -Wold-style-definition by default Those are available in all gcc and clang versions that support C11 and as C11 is required as of f5e0186f865c, then we can add them without capability test. The new flags are moved in configure.ac late enough to avoid any error (for example, PGAC_PRINTF_ARCHETYPE which uses -Werror and would fail to detect gnu_printf if -Wstrict-prototypes is active) leading to mingw_cross_warning CI task failing. Also, readline headers trigger a lot of warnings with -Wstrict-prototypes, so we make use of the system_header pragma to hide the warnings (as discussed in [3]. [1]: https://postgr.es/m/262909b8-3f4b-42ce-acd7-bdd4a6897990%40eisentraut.org [2]: https://postgr.es/m/aTJ9T8HyJN3D024w%40ip-10-97-1-34.eu-west-3.compute.internal [3]: https://postgr.es/m/1049756.1764861448%40sss.pgh.pa.us Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com --xofE7MYp3i9PRJLn Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-Prevent-Wstrict-prototypes-and-Wold-style-definit.patch"