From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92118 invoked by alias); 24 Jul 2018 20:18:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 92085 invoked by uid 89); 24 Jul 2018 20:18:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:k21-v6s X-HELO: mail-qt0-f175.google.com Received: from mail-qt0-f175.google.com (HELO mail-qt0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Jul 2018 20:18:27 +0000 Received: by mail-qt0-f175.google.com with SMTP id b15-v6so5466750qtp.11 for ; Tue, 24 Jul 2018 13:18:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=nKwNxDHV7cV6bQwHNjJYCWIm2jUVLFOouVXbFZhEoro=; b=aT0fc8XkUe6Wom9NC3TZkWDIjDfrrbguUlYxNXynx3fuxlUKIwsHYg6tLUyYV5itB5 7Cekg9ZndUBPNYM0kTurRSeOZjlJcyb7A2+2MgeKjTfOymEWHI/mvNX/Sfooo6booAtP gLhUtigK8frd4vXg/RUoOy8AjbolsOPZztOGnfqCjDAbNu3uHwJC6VxqZDCLa/d0Duid b9ThosWdLozi7PPhAoLwiRkPQggVW/idE8lq5bQ3JwyY1XqGYjWvA9fwUMukPRQhcaxQ 6Ld0/+qVH0vlW2IZDQJyKsagvzQRPUUWHzos05umfAw9iopEXYMkKy6WfZ/v/MMA0Xyx XsJw== Return-Path: Received: from localhost.localdomain (97-118-124-30.hlrn.qwest.net. [97.118.124.30]) by smtp.gmail.com with ESMTPSA id k21-v6sm7203849qtj.11.2018.07.24.13.18.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 13:18:24 -0700 (PDT) Subject: Re: committed: remove redundant -Wall from -Warray-bounds (PR 82063) To: Franz Sirl , Gcc Patch List References: <841b9a52-060e-5a16-28da-aec967a65277@lauterbach.com> <8489a83b-2401-708e-49b2-158b29f254bf@lauterbach.com> From: Martin Sebor Message-ID: <82c281eb-2e79-f35f-6aba-d9d52061e429@gmail.com> Date: Tue, 24 Jul 2018 20:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <8489a83b-2401-708e-49b2-158b29f254bf@lauterbach.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg01427.txt.bz2 On 07/24/2018 01:48 PM, Franz Sirl wrote: > Am 2018-07-24 um 17:35 schrieb Martin Sebor: >> On 07/24/2018 03:24 AM, Franz Sirl wrote: >>> Am 2018-07-20 um 23:22 schrieb Martin Sebor: >>>> As the last observation in PR 82063 Jim points out that >>>> >>>> Both -Warray-bounds and -Warray-bounds= are listed in the c.opt >>>> file as being enabled by -Wall, but they are the same option, >>>> and it causes this one option to be processed twice in the >>>> C_handle_option_auto function in the generated options.c file. >>>> It gets set to the same value twice, so it does work as intended, >>>> but this is wasteful. >>>> >>>> I have removed the redundant -Wall from the first option and >>>> committed the change as obvious in r262912. >>> >>> Hi Martin, >>> >>> this looks related to PR 68845 and my patch in there. I never posted it >>> to gcc-patches because I couldn't find a definitive answer on how >>> options duplicated between common.opt and c-family/c.opt are supposed to >>> be handled. >>> For example, Warray-bounds in common.opt is a separate option (not an >>> alias to Warray-bounds=), leading to separate enums for them. Is this >>> intended? Warray-bounds seemed to be the only option with an equal sign >>> doing it like that at that time. Now Wcast-align is doing the same... >>> >>> Can you shed some light on this? >> >> -Warray-bounds= (the form that takes an argument) was added in >> r219577. Before then, only the plain form existed. If I had >> to guess, the interplay between the two options (as opposed to >> making the latter an alias for the new option) wasn't considered. >> I didn't think of it until now either. Your patch seems like >> the right solution to me. Let me know if you will submit it. >> If not, I posted the patch below that touches this area and >> that will likely need updating so I can roll your change into >> it: >> >> https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01286.html > > I'll post a patch tomorrow, since I already have all the changes > available and tested here. > > Note that one minor change with this patch is that with > -fdiagnostics-show-option the message will show -Warray-bounds= (equal > sign added) instead of -Warray-bounds. That should be fine. Martin