From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id 6CB933858C2B for ; Tue, 9 May 2023 22:46:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6CB933858C2B 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-x534.google.com with SMTP id 4fb4d7f45d1cf-50bd2d7ba74so63371272a12.1 for ; Tue, 09 May 2023 15:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683672362; x=1686264362; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gZJDDCYQFrvdyKQpxwAm17RtoPiAFcx6MiWpommkEpE=; b=JVOAxP8btrImXwa5npl/Sl5keghpZCWzAL/2/zHpIZgbEV8MwEmgKB8s34dN5oQLEj cK3G3esy/Dawgp0589sQ5onXNtyWWczej2SHT71xTahrmUVV84UhDqKpnmM5N5bpI99C ZstL9YICgTdx0tjMritO2Z3hg8OAU+aO7NLYQOf4XjRscuOjUTpN0L1xB+h+ta4/atAh Hf+1Rf31G/i6sJwgYsAsWM6UbobKQwgUCL+YGuBWd4NQpyTwevHTCZlm+sGZUm7Xi2g1 tHXytkmek4N+akQ0vkpernGwhrtX1nv+HcxN3h8N9OhXAO6n4mGl0ctXU2IUMFcWccOl /kug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683672362; x=1686264362; 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=gZJDDCYQFrvdyKQpxwAm17RtoPiAFcx6MiWpommkEpE=; b=AN5nLb6PQSTC4gkRl7DQKIwis8Wi+4UbN+KglN518hxTQfnWx7u6Rw5Zsfge+Nql8K 8utrdhKvHwlTGGOKCyDgI1CjmRWZVV6IrnowMVsgGgdiuaqWieNycsh7Bm8BMDbYuiEg mxYBCFXm6MPhlUTQ01rORfyqFK5ogVVnG/EQByV9HTBUEjz/gZMbchics1KL6x2lNcjr Vzxr0W+mONhasyGKTWYojvUkzHQJC03B87SKVVfhX8zR8F2j+YGotGOy5vJ8MyxLIgpb Ut2AzIaF40lVHCHYr1w56sGLpYstQx0Wm/lMDUcC8C1iVwMIhxKnyZ6+BhwMy8U/hWLo jAvw== X-Gm-Message-State: AC+VfDxQGIRlFpR30/43OPo8qaW6lBesuckGdu4doXVnXjby/dezLeyl aPFuV4KGV4HzgWunepOOUXxv3M/vmWhNQfx21AY= X-Google-Smtp-Source: ACHHUZ4aNgmSqXmRQvIRXS40OSwkWLVdn7C4u1KuI5g0z9zzNO60SGWQZ+8XPZC5nIl0hw7lcKe+nqA4is+nmHk73ok= X-Received: by 2002:a17:907:8a24:b0:969:e993:6ff0 with SMTP id sc36-20020a1709078a2400b00969e9936ff0mr3601453ejc.25.1683672362024; Tue, 09 May 2023 15:46:02 -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: Tue, 9 May 2023 23:45:50 +0100 Message-ID: Subject: Re: More C type errors by default for GCC 14 To: joel@rtems.org Cc: 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.2 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 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 > i am a bit gun shy because I remember the move from GCC 3.3 to 3.4 > where the improved strict alias checking gave us a LOT of warnings to > deal with and it felt overwhelming. I don't want to do that again. > > But I believe in letting the compiler get stricter and find things. Defaulting > to stricter checking is a good thing. The checks are already done, they're just warnings by default, and so easily missed/ignored when compiling large code bases.