From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 539D03858D37 for ; Tue, 9 May 2023 16:58:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 539D03858D37 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=golang.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=google.com Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-965cc5170bdso870574266b.2 for ; Tue, 09 May 2023 09:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golang-org.20221208.gappssmtp.com; s=20221208; t=1683651536; x=1686243536; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wVYTdJzfFG961uGu+0oTLALXxodyxbqPvgrRL+9wqLY=; b=y94HB7W/2vDt+DwbjpV5xkmwwdpfzkdqbll6DQ+ljc+ZnkL2dhSlhFPhPqUYPRXU/C tvfIjmdivi66MSCHsNEaRrGzrvVLGy9sLa/2+5VBa4uE2R2H2+A7dVBgr899dqbvMxfj s3/fG8pytTOL87SLXFYcz0p4N5/cYkDHuZuwoHkRnzSAkRaCFjPKaY1vKLdsNDtiwStF RRD9pr5qWXYPsoK6hqe+5Jd/0WYb0Nn4UPznSIyK5EFZ3FNm6JEdI8oRoAV3eGp4e4tx N3hf7c6SOuBWcrQsNLrNNRhRY2N6+GaQs8LchvIe7Z5QQsXNfwvCM1rHhwe+CkE/7Zav ecfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683651536; x=1686243536; h=content-transfer-encoding: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=wVYTdJzfFG961uGu+0oTLALXxodyxbqPvgrRL+9wqLY=; b=lhBEFv6JOkwGCTFZvehZTcNNDthpCMnwz0fg0SMZX/y5OeK3gwsXzfPoIEpW8Y4r1Q UJqXTqPKljgEAiXvu+wKs+/fjpMawLZV34TMNbTGu3gSbHtYKqSczmGp4UiHOtt+cyAl CJzUNhHdx8AdZQPTLqbvo4qSx6jaeo+jtYZLNcR9jfpzaFMjweBKlXPB3QPwsRveZ6fY 6ELw5WgS1VJyGgS0hSELumixJYHwQU4QNxYrZncMBLKNXk8Qa1iVkEeg+tEx+Ql5lcB4 AW78h1CIu6dz6neP6qMNaY7bzW9pUiWnsQXEyEU9Im1eoc2XSO1Vfyo62xqMEffdYuGj S9mg== X-Gm-Message-State: AC+VfDzJB7s2NT0LLCal7dQoxWqQi6Yc+pqX9s9drkSWi1Gdp9Okj4FA V/C7vb8lN9BLKISXMkYrqMohlXGFPtaXb6M/2txrqw== X-Google-Smtp-Source: ACHHUZ5BqvHvmQWUBWqad00FZRMxknyqtPkfACVFX2qH7kU0YSxt64EAwuuhRopRojfOMxeWt08XIj8WX5HGfhTdTS8= X-Received: by 2002:a17:906:58d1:b0:96a:52e:5379 with SMTP id e17-20020a17090658d100b0096a052e5379mr1442900ejs.63.1683651535791; Tue, 09 May 2023 09:58:55 -0700 (PDT) MIME-Version: 1.0 References: <87y1lx4fpb.fsf@oldenburg.str.redhat.com> In-Reply-To: <87y1lx4fpb.fsf@oldenburg.str.redhat.com> From: Ian Lance Taylor Date: Tue, 9 May 2023 09:58:44 -0700 Message-ID: Subject: Re: More C type errors by default for GCC 14 To: Florian Weimer Cc: Richard Biener , David Edelsohn , Jakub Jelinek , gcc@gcc.gnu.org, c-std-porting@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_SPF_WL 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, May 9, 2023 at 9:45=E2=80=AFAM Florian Weimer via Gcc wrote: > > The part David quoted above is about this: > > $ gcc -fno-gnu89-inline -std=3Dgnu89 t.c > cc1: error: =E2=80=98-fno-gnu89-inline=E2=80=99 is only supported in GNU9= 9 or C99 mode > > And some packages need -fno-gnu89-inline, but also rely on implicit ints > and implicit function declarations heavily. With a purely C89-based > opt-out and the -fno-gnu89-inline limitation, we wouldn't have a way to > compile these self-contradictory programs. Hence the idea of > -fpermissive, in addition to the -std=3Dgnu89 escape hatch. > > But perhaps the -fno-gnu89-inline limitation is easy to eliminate. The > remaining reason for -fpermissive would be a flag that is accepted by > both gcc and g++, in case a package build system passes CFLAGS to g++ as > well, which sometimes happens. And -fno-gnu89-inline is currently not > accepted by g++. But in the Fedora package set, this (some C++ and a > C89 requirement) must be exceedingly rare because it's a subset of the > already tiny set of -fno-gnu89-inline -std=3Dgnu89 packages. I think I wrote that error, back in 2007, because I thought it was odd to rely on the C99 semantics for inline functions when not using C99. And to encourage people to move to C99. But I wouldn't be surprised if the compiler just works without the error. It would just require adding a few test cases similar to gcc.dg/inline-18.c through inline-21.c (well, inline-21.c would have to be removed or rewritten). Ian