From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by sourceware.org (Postfix) with ESMTPS id 278B03858D28; Mon, 7 Aug 2023 13:04:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 278B03858D28 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-lj1-x230.google.com with SMTP id 38308e7fff4ca-2b9c907bc68so69936011fa.2; Mon, 07 Aug 2023 06:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691413468; x=1692018268; 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=C4NUZFRwed3RkPkRzMbCNOhTo767dKVj8bSEQ3ZkPNA=; b=F32OD6vSjvQZx7x9ElTeS5zL2abpoz8ARiNdGg0HIGO0afY+cetXz/5y/J6Rb1mT13 iQ9OkbOef7JMkTVRVehtQkBwrJZxD73u5WuqXKY9ALzVaYZFEDswH5okK522eIdSUw2M FKsUloUoJjXHxbIU4obwfyIcV+AqpkLWvImqI8UVJ4OtXhh/L2fsCVOSMQbY32rVeclc jKOBjGmfiogDsZcMFxoa/Mt8bJQvGArH99yZ6fVgBTGn9f+LPLI+X9uFSu4w35wkABi6 mctsi24KAILoT8mugLQEnOK40cixqm5N+Xi6zUpK+OaQXX93sNpf9Sux4nNkGwx8FL8B +xCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691413468; x=1692018268; 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=C4NUZFRwed3RkPkRzMbCNOhTo767dKVj8bSEQ3ZkPNA=; b=QxRVtHQ60wIOItLTEKr7E06KlbypFJXBh1f3Qr+Gu3M4lWVjPy0oxJy5+S4BQJzcwS Poq30YMX83EIeKXYipGyVtkLnAwsLARWjLGkcvjriQGlIepBMCSMofdyZv8d0h8woRVL 9LFOoYMGD+9SrudQdhxWBIjmVxhFmeR9WwTI7ALOOx4QsY58tba5Sjuo4y4yFopjIdxL l6enNeNzul9WQJzUlWgIbDRnjGYdplCNMrXZ/YMCaPv//em/A8ldfGGIO9hfmBA9Cr/U xw7I0skT6mByWglRvqaT59GZPWYXm2K/bZqrX0ablMckv3Xi3vmFLzx9d0U5nCXgJ+L9 qqIg== X-Gm-Message-State: AOJu0YzuhvOyi4H94mBFj79wDUxxsGm0MnbWkJtZpzvJ+9QNv1+6U8RE F8ls1bEIXTPw4+y86RIu1PHgSVjo/CyHJHb1FtY= X-Google-Smtp-Source: AGHT+IGxMm46Tz9ACTtc/ZvXxcU1o7K62YREyj+7kgKHG1mNnJDmF5CHyCUMhK3JrUaTyvSTl6gKDirgm/IxANgDPTc= X-Received: by 2002:a05:651c:217:b0:2b9:bbf5:7c6 with SMTP id y23-20020a05651c021700b002b9bbf507c6mr6296633ljn.43.1691413468106; Mon, 07 Aug 2023 06:04:28 -0700 (PDT) MIME-Version: 1.0 References: <3A4C9996-750B-4E3F-8F30-E3DA4366C7B5@berlin.de> In-Reply-To: From: Jonathan Wakely Date: Mon, 7 Aug 2023 14:04:17 +0100 Message-ID: Subject: Re: GCC support for extensions from later standards To: Jason Merrill Cc: Nikolas Klauser , gcc@gcc.gnu.org, Louis Dionne , Mark de Wever , aaron@aaronballman.com, "libstdc++" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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: On Sun, 6 Aug 2023 at 20:43, Jonathan Wakely wrote: > > On Sun, 6 Aug 2023 at 20:20, Jason Merrill via Libstdc++ > wrote: > > > > On Wed, Aug 2, 2023 at 12:02=E2=80=AFPM Nikolas Klauser > > wrote: > > > > > Hi everyone! > > > > > > I'm working on libc++ and we are currently discussing using language > > > extensions from later standards ( > > > https://discourse.llvm.org/t/rfc-use-language-extensions-from-future-= standards-in-libc/71898/4). > > > By that I mean things like using `if constexpr` with `-std=3Dc++11`. = GCC has > > > quite a lot of these kinds of conforming extensions, but doesn't docu= ment > > > them AFAICT. While discussing using these extensions, the question ca= me up > > > what GCCs support policy for these is. Aaron was kind enough to answe= r > > > these questions for us on the Clang side. Since I couldn't find anyth= ing in > > > the documentation, I thought I'd ask here. > > > > > > So, here are my questions: > > > > > > Do you expect that these extensions will ever be removed for some rea= son? > > > If yes, what could those reasons be? > > > > > > > Potentially, if they don't actually work properly in earlier standard > > modes. I recently noticed that while we allow DMI and =3Ddefault in C+= +03 > > mode with a pedwarn, combining them doesn't work. > > > > Some of the extensions are needed by libstdc++ and are therefore well > > tested; these are extremely unlikely to ever be removed. libstdc++ fol= ks, > > is there a list of these? > > We use variadic templates and long long in C++98. We use a DMI in > __gnu_cxx::__mutex even in C++98. I don't think we unconditionally use > anything else, because we can't rely on it being available when using > non-GCC compilers, or when compiling with -Wsystem-headers -pedantic. > We don't use if-constexpr before C++17 for example. Oh, but we do use __decltype in a few places.