From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id E00783858C00 for ; Mon, 27 Mar 2023 11:42:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E00783858C00 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=jguk.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jguk.org Received: by mail-wr1-x431.google.com with SMTP id q19so5378106wrc.5 for ; Mon, 27 Mar 2023 04:42:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jguk.org; s=google; t=1679917363; h=content-transfer-encoding:content-language:to:subject:from :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=MSBtBrS//0TSk5nzXBar8+Gb7Be7/m6jiougxMg+HzM=; b=lupP5k7NYm3Fy+Jjlgm7WYDtrgFqsByZRhiHqonBu+2UqFu47YD8Y1+osUV6cbNJCw PzSUaHt1+RKblISB4RZnJkBFyMl9j1d7DRkJPpbjVBpSi/eSXzH/cLbf8npglHMQMW8d 12Sqax3D+dthriCyTjPoHg0EAb6My9nYSC3Iq+2sli6I++mQJWALXz3jMrKQMPRF2MqR xKKZ1m3cbzm1RYkihExKS6jNQr6+QmLwDxBCn656apfvIE8Pw/zYL2o4DPrSe7pb5lpo sJbwgTx0eXAaQwQAe/nzZaetlDmaXMdo3T6pzMYxdYtjZVxajb/m3L/Cz6eUfHJhXSaa 7Xhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679917363; h=content-transfer-encoding:content-language:to:subject:from :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=MSBtBrS//0TSk5nzXBar8+Gb7Be7/m6jiougxMg+HzM=; b=DLXk3oeQbXOZRln0tBlUvkUmMqgLqzACRgcJiF3gNboqPm+Xdh+bWqEPCfu+6C2SxL E2/ODCk9q1pNp/6mV9R6u6DgUQy8f9jlqOr01gB8M3bwKelvirz0HW2OiqTPJB/f1GiV 9qiE4nlAHIXHWQ9XNi9E5HizstnpAvPVndQQKVvXgSffuDSUWzFVbpcvrS1+mlKy/WuZ O34tAz7nLTXusaRZY7f+FmKz2SR5rFpylCPzL1D9sktkXlHbjeFYnIpGuV5k+rokFyxj VfYj0yJJD5z4egoi+sDeOGvtoLzRrBzl0rx09dEHdoYdqul7uzCm1yVM5xD0+mWk9vnp UmFg== X-Gm-Message-State: AAQBX9fg5d1VsKnI7l3ie26MbCowpihvB6E2uj9/FSZq/YHNfhgGjIm2 WsNPzHmafe/ev+7H6gxzOGYjOuPrU+aUc5PD90U= X-Google-Smtp-Source: AKy350aawF877xA866A9kY6Oge2SY1UOrWHOlYnGf2s8JCaWObleUK6bWbUm3ZLamBlZ0gyPnmY0Dg== X-Received: by 2002:adf:fa8e:0:b0:2c9:a6be:34e1 with SMTP id h14-20020adffa8e000000b002c9a6be34e1mr9370400wrr.55.1679917363250; Mon, 27 Mar 2023 04:42:43 -0700 (PDT) Received: from [192.168.0.12] (cpc87345-slou4-2-0-cust172.17-4.cable.virginm.net. [81.101.252.173]) by smtp.gmail.com with ESMTPSA id o17-20020a056000011100b002d30fe0d2fcsm24881206wrx.13.2023.03.27.04.42.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Mar 2023 04:42:42 -0700 (PDT) Message-ID: Date: Mon, 27 Mar 2023 12:42:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 From: Jonny Grant Subject: gcc param min-pagesize To: gcc-help Content-Language: en-GB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello I saw this part of the manual documents "min-pagesize" added by Martin Liska. https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Optimize-Options "min-pagesize Minimum page size for warning purposes." Could anyone give more explanation of it's purpose please? It sounds very useful. I was expecting the value to be a pagesize, with zero disabling it. However, trying it out it seems it sets the lowest accessible address, is that the case? If so I can make a patch to clarify that in the manual. I did a test where I set it to 257 with a struct at 0x100 and that does give the array-bounds warning still, so maybe it's actually just the minimum address. https://godbolt.org/z/ohhv5eMvK I had read on this ticket about setting --param=min-pagesize=0 to allow access to the first 0x1000 address range (for embedded) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106699#c1 Thanks Jonny