From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id DA2CE385382F for ; Wed, 10 May 2023 10:51:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DA2CE385382F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-50bd37ca954so67726013a12.0 for ; Wed, 10 May 2023 03:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683715877; x=1686307877; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BFm0dI7RtUxR7WjWmKtYexRg8P48+nq6M4o3Id37REw=; b=EXZVJNLGqmPxPWWb7qmweaRCKN/iwFL0Xu6yNV+htO7fN+0Ekjs27bd8qN5TRvDpSp U49bHFM1MNPLhIFJNzy0p+27WqDhW3/xQBYWAhvD5wIVviDPhPId8Gr3yS7OyzU2/r6b 1uP9mtmMqBZoTRwXN8Ds/ACUbZkxVzt1Qvhp7FS4Dxn0VIEEauyVSssEIIeBOSALPfrx +7aXkQNV60epM46df7HUllZJA85BVZNW7nYAIbZ4DHdNXa0MVosaDqGhqmMb/b7cPmAi 4GPncAKCPneHAdxkf1DuehQZTSMwG/IwWCTTI6RsrW/EhZkSLqnoR+x9bqds0dNEFTeE 2hJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683715877; x=1686307877; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BFm0dI7RtUxR7WjWmKtYexRg8P48+nq6M4o3Id37REw=; b=XifvD/jbJIEC0j8f6/dwIwV+SdO0pCRzNBVMp71fDUZZBfMiWWCr+bs8+p6lbJcgOw NT9FQq8/v+5xur3z/oQ1BIKDgiRl7XuNmDFGVK7q4EsfXIsJKrxdNhEDwxZYq91Uz2B8 7030dCi9VkINQKi3G7lIeBA5b5qoHP+99GOgptoI9Pt8HX8FW5NXcJyKoINyVV2AVaSy E0lvoFWBX9ZSPyGV/ez4inSE4THFmDx26/GbOLphD1q15k0BsJ9DzRR3/bJ6GQQqapQi EkVNokmDXOV5zZfVmTo6fWjcOBmadNO/iyaoHiyXQplpBr5dRyAABDDmZ5wb3g8tTESv ov6g== X-Gm-Message-State: AC+VfDzLJgado2kSxEVvFp+2DIaeNCCN+CeJf9rPkSKtt9vu8t9vQPTx pb9IGCjVSgwU4r+2ZHVEa31xK93FbPsZlaQWupM= X-Google-Smtp-Source: ACHHUZ48kkZgHPRK9KYAzNPse0hA/f6LORDmhVCLaJndwYwWp8pOhQpvjdRjV+UEysgbNUMdR1T7sSK9u24WhdEVOnQ= X-Received: by 2002:a17:907:d05:b0:94a:4e86:31bc with SMTP id gn5-20020a1709070d0500b0094a4e8631bcmr16683151ejc.13.1683715877209; Wed, 10 May 2023 03:51:17 -0700 (PDT) MIME-Version: 1.0 References: <877cth66qb.fsf@oldenburg.str.redhat.com> <20230509102201.6aa2a7d14fdb2f1e7abff449@killthe.net> <87r0rp5uf8.fsf@aarsen.me> <83ttwla1ep.fsf@gnu.org> <83lehx9vix.fsf@gnu.org> <83fs859unu.fsf@gnu.org> In-Reply-To: From: Jonathan Wakely Date: Wed, 10 May 2023 11:51:05 +0100 Message-ID: Subject: Re: More C type errors by default for GCC 14 To: Eric Gallager Cc: joel@rtems.org, David Edelsohn , Eli Zaretskii , Jakub Jelinek , =?UTF-8?Q?Arsen_Arsenovi=C4=87?= , "gcc@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 10 May 2023 at 11:48, Jonathan Wakely wrote: > > On Wed, 10 May 2023 at 11:40, Eric Gallager wrote: > > > > On 5/9/23, Jonathan Wakely via Gcc wrote: > > > On Tue, 9 May 2023 at 23:38, Joel Sherrill wrote: > > >> We are currently using gcc 12 and specifying C11. To experiment with > > >> these stricter warnings and slowly address them, would we need to build > > >> with a newer C version? > > > > > > No, the proposed changes are to give errors (instead of warnings) for > > > rules introduced in C99. GCC is just two decades late in enforcing the > > > C99 rules properly! > > > > > > > > >> What practices might the GCC community recommend to a project > > >> wanting to discover the issues uncovered and slowly address them? I > > > > > > -Werror=implicit-int > > > -Werror=implicit-function-declaration > > > -Werror=int-conversion > > > > > > > Idea for a compromise: What if, instead of flipping the switch on all > > 3 of these at once, we staggered them so that each one becomes a > > default in a separate release? i.e., something like: > > > > - GCC 14: -Werror=implicit-function-declaration gets added to the defaults > > - GCC 15: -Werror=implicit-int gets added to the defaults > > - GCC 16: -Werror=int-conversion gets added to the defaults > > > > That would give people more time to catch up on a particular warning, > > rather than overwhelming them with a whole bunch all at once. Just an > > idea. > > On the Suse list there was a strong objection to doing that, because > it just prolongs the pain. It means maintainers spend the next three > years dealing with it, fixing the same packages again and again, > instead of just getting it done. And if you don't want to deal with them all, just use the -fpermissive flag (or however it will be named) to get the old behaviour. I really don't see how dragging this out over **another** three years will help anybody. Florian's already been working on this for years.