From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 159893851AA1 for ; Tue, 30 Aug 2022 14:00:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 159893851AA1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661868044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i8Ro7xoqdtSpXUjwZx2voK1vBdzE+U1np2TzSdhE1wg=; b=eX3RvrBZ+JAGlXSfQ8Goc/xYco3S8ekPCrEbSuo3Ua9rC5LNO4ydOksFRJkhx8197O39a3 K3ARA56EtC0M8T7RJvAIolhO2Ae1uAP4IH4RnbLuIsKcdvbdvg/Fz0UazTgxAz/+AaPE+E 5Ty4oXLs/1aUiFP0QH3FELeQPvXlj0o= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-263-33HbpRcIOBGc5jU_3J3Smg-1; Tue, 30 Aug 2022 10:00:43 -0400 X-MC-Unique: 33HbpRcIOBGc5jU_3J3Smg-1 Received: by mail-qv1-f71.google.com with SMTP id e17-20020ad44431000000b00498f6fa689eso4999096qvt.9 for ; Tue, 30 Aug 2022 07:00:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc; bh=i8Ro7xoqdtSpXUjwZx2voK1vBdzE+U1np2TzSdhE1wg=; b=dDHcjbwTlsN23hNsMKKX76FnJ7Otp6U0WmhRt5PxY3JZ3WMVZmHdc6/kGO/pdCkMTA 2fk5Oy4r/WeFEOxgHV3fFyFHtswRf2j0Z1+2GR9QSHqFh2bIaIiIHOuXL7HGQWngAUlP wy379X0ifIhhhXrgzieVgM8YwVH4smAOZb2Zql0VtteLnxpZvOjBjr4Z3A6FNvyfxq9C 2ZZqTlukoBo1+PvT6z1KFE5U3qttuGiyeIZ1pol1fKIxgVrzdf7hCKNLuVnF29KX9zfU AlrEwmK/Z6SZ8hgTNSSeI809wMI33xCdrWA3Uenqbyb4e0xyy/wFkrLnwu3cpEZqZD5E zWPg== X-Gm-Message-State: ACgBeo218tussv/t/HBDgjAgXPOzI3bMMnosalJMPGpG2pgFGV/xUoyZ WvgLdA7ZGzhB+PQOKdsW9VU42byMOxXPv+sDPmR03ihefuso1eSB3YN3izLhrjCD2a9fdqHhMil JQf0phg/T72sXv+AZqQ== X-Received: by 2002:a0c:a907:0:b0:496:cf4f:2426 with SMTP id y7-20020a0ca907000000b00496cf4f2426mr14577972qva.119.1661868042595; Tue, 30 Aug 2022 07:00:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR6sGfyTo0U3+QWKmIgVhoSFwcJ7TvWGsbNLE47V1ZZpef0diDPTD539qiKHWtr1EdYYIjrWKA== X-Received: by 2002:a0c:a907:0:b0:496:cf4f:2426 with SMTP id y7-20020a0ca907000000b00496cf4f2426mr14577921qva.119.1661868042112; Tue, 30 Aug 2022 07:00:42 -0700 (PDT) Received: from redhat.com ([2601:184:4780:4310::e531]) by smtp.gmail.com with ESMTPSA id y13-20020a05620a44cd00b006bb8b5b79efsm8714403qkp.129.2022.08.30.07.00.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 07:00:41 -0700 (PDT) Date: Tue, 30 Aug 2022 10:00:39 -0400 From: Marek Polacek To: Jason Merrill Cc: Nathan Sidwell , GCC Patches Subject: Re: C++: add -std={c,gnu}++{current,future} Message-ID: References: <045690d0-9a3a-13c9-61d8-6e2c54d53fc7@acm.org> <03ea18c4-b6d1-bcf0-a6d5-24624d34df6e@redhat.com> MIME-Version: 1.0 In-Reply-To: <03ea18c4-b6d1-bcf0-a6d5-24624d34df6e@redhat.com> User-Agent: Mutt/2.2.6 (2022-06-05) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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 Tue, Aug 30, 2022 at 09:22:14AM -0400, Jason Merrill via Gcc-patches wrote: > On 7/13/22 15:29, Nathan Sidwell wrote: > > Inspired by a user question.  Jason, thoughts? > > > > Since C++ is such a moving target, Microsoft have /std:c++latest > > (AFAICT clang does not), to select the currently implemented version > > of the working paper.  But the use of 'std:latest' is somewhat > > ambiguous -- the current std is C++20 -- that's the latest std, the > > next std will more than likely but not necessarily be C++23.  So this > > adds: > > > >   -std=c++current -- the current std (c++20) > >   -std=c++future -- the working paper (c++2b) > > > > also adds gnu++current and gnu++future to select the gnu-extended > > variants. > > I like this direction. > > I imagine people using these to mean roughly beta and alpha, respectively. > > Perhaps we also want -std=c++stable, which would currently be equivalent to > the default (c++17) but might not always be. I wonder how these new switches would be useful in older releases. If I use -std=c++current with gcc 5 years old, that's probably not very useful? Should there be a way to know what these options map to? Also, I suppose that if we switch the default to gnu++20, then there may be a window when -std=gnu++current == the default. Marek